Shuode Li
57955b968b
Merge branch 'master' into master
2020-05-06 00:15:57 -07:00
Andrew Mason
90ad7a061f
Handle the rest of rows.Err
cases
2020-04-21 12:50:23 -04:00
Andrew Mason
61de098072
Add a check to rows.Err after processing all rows
...
Closes #822 .
In https://github.com/go-sql-driver/mysql/issues/1075 , @acharis notes
that the way the go-sql driver is written, query timeout errors don't
get set in `rows.Err()` until _after_ a call to `rows.Next()` is made.
Because this kind of error means there will be no rows in the result
set, the `for rows.Next()` will never enter the for loop, so we must
check the value of `rows.Err()` after the loop, and surface the error up
appropriately.
2020-03-31 16:25:16 -04:00
Justin Fudally
2178b5947b
remove spammy error
2020-03-30 10:05:23 -05:00
Justin Fudally
5816ede7b3
add error message
2020-03-30 09:55:49 -05:00
Justin Fudally
7893f8e1c3
catch error in collectFunc
2020-03-30 09:53:10 -05:00
Justin Fudally
df60fa4204
add error logging
2020-03-25 16:06:17 -05:00
Justin Fudally
57cf5f3c90
add override to ignore http errors
2020-03-25 15:58:32 -05:00
Justin Fudally
46dabd338b
go fmt
2020-03-25 15:48:19 -05:00
Justin Fudally
d31f3aac0c
Add CLI flag for ignoring http errors
2020-03-25 15:47:56 -05:00
Justin Fudally
ca0b822a3d
Add comment
2020-03-25 15:41:23 -05:00
Justin Fudally
64083e4705
Throttle on no metrics/error
2020-03-25 15:40:09 -05:00
Justin Fudally
0b2702bf53
Throttle on no metrics/error
2020-03-25 14:12:00 -05:00
Shlomi Noach
97f2d71616
fix unit tests
2020-02-16 12:52:26 +02:00
Shlomi Noach
9f5edc923e
Support --mysql-timeout flag
2020-02-16 12:48:23 +02:00
Yaser Azfar
2eb141010b
adds error checking for an err variable that was left unchecked
2019-12-27 16:54:43 +13:00
Shuode Li
13b5f48ca5
Remove useless code
2019-12-17 04:03:51 +00:00
Shuode Li
ae762694fb
Support Azure Database for MySQL.
2019-12-17 03:47:14 +00:00
Shlomi Noach
a36d6bee94
Merge branch 'logging-interface-contrib' into master
2019-12-11 07:03:37 +02:00
Shlomi Noach
d0ce7c014e
truncate lag digits
2019-10-23 10:18:56 +03:00
Abeyu M
3ca5f89fa5
add migrationcontext to gomysql_reader
2019-10-08 13:49:15 -04:00
Abeyu M
f4676bf463
implement a logging interface
2019-10-07 11:10:36 -04:00
Shlomi Noach
21e7ec6b7c
lag: %+vs notation, e.g. 1s
2019-10-07 07:06:11 +03:00
Shlomi Noach
271c7274a3
refactor progressPct into migrationContext
2019-10-07 06:59:56 +03:00
Shlomi Noach
7869889988
context, status and hooks: progressPct and CurrentLag
2019-10-06 17:08:35 +03:00
Shlomi Noach
3175c2fe74
Merge branch 'master' into ggunson-panic-message
2019-08-13 08:39:43 +03:00
Gillian Gunson
3362c5d322
Changing panic message
2019-08-12 12:40:31 -07:00
Shlomi Noach
b881bff1e8
fixed linter issue
2019-08-11 15:06:03 +03:00
Shlomi Noach
f0ed7aeb0b
Always use NO_AUTO_VALUE_ON_ZERO
2019-03-24 11:32:42 +02:00
Shlomi Noach
7ae32f7184
Merge branch 'master' into skip-strict-mode
2019-03-17 23:49:13 -07:00
Shlomi Noach
766040d83f
Merge branch 'master' into named-panic
2019-03-06 12:47:06 +02:00
Shlomi Noach
7ead4c4a56
named throttle, no-throttle
2019-02-25 14:02:57 +02:00
Shlomi Noach
ff17d2f844
Merge branch 'master' into named-panic
2019-02-25 14:00:12 +02:00
Rafe Kettler
b4da7cfbfb
Improve SSL support
...
Related issue: https://github.com/github/gh-ost/issues/521
- Add --ssl-cert and --ssl-key options to specify SSL public/private
key files
- Allow combining --ssl-allow-insecure with other --ssl* flags.
`mysql.RegisterTLSConfig` allows combining the corresponding
parameters in the `tls.Config` it receives, so gh-ost should
allow this. I found being able to pass --ssl-allow-insecure along
with --ssl-ca, --ssl-cert, and --ssl-key useful in testing.
- Use the same TLS config everywhere. Since the CLI only supports
a single set of --ssl* configuration parameters, this should be
fine -- `mysql.RegisterTLSConfig` documentation indicates the
TLS config given will not be modified, so it can safely be used
in many goroutines provided we also do not modify it. The previous
implementation did not work when the TLS config was duplicated,
which happens when gh-ost walks up the replication chain trying
to find the master. This is because, when the config is duplicated,
we must call `RegisterTLSConfig` again with the new config. This
config is exactly the same, so it's easiest to side-step the issue
by registering the TLS config once and using it everywhere.
2019-02-22 10:33:19 -08:00
babinomec
7d5749b84a
add --skip-strict-mode option
2019-02-14 15:58:49 +01:00
Shlomi Noach
9da2e21e03
Merge branch 'master' into add-tls-support
2019-02-10 11:27:36 +02:00
Brandon Bodnar
5b0dfb009c
Wireup allowing insecure ssl
2019-02-04 16:21:25 -06:00
Matt Belisle
79df0d1c5d
Adding --ssl-insecure flag
2019-02-04 14:46:08 -06:00
Brandon Bodnar
5319157789
Expand usage statement to indicate setting applies to multiple hosts
2019-02-01 13:20:17 -06:00
Brandon Bodnar
f67ec15f2b
Handle returned error
2019-02-01 13:16:54 -06:00
Brandon Bodnar
c440112d44
Explain default setting for TLS param in DSN
2019-01-31 17:23:19 -06:00
Brandon Bodnar
dc599bb036
Remove unnecessary branching
2019-01-31 17:20:11 -06:00
Brandon Bodnar
4f9367e690
Fix casing for initialism
2019-01-31 17:00:13 -06:00
Brandon Bodnar
23617f287f
Add initial support for ssl encryption connections to database servers.
...
- Adding a command line option for users to enforce tls/ssl connections
for the applier, inspector, and binlog reader.
- The user can optionally request server certificate verification through
a command line option to specify the ca cert via a file path.
- Fixes an existing bug appending the timeout option to the singleton
applier connection.
2019-01-31 15:22:03 -06:00
Shlomi Noach
1671530300
Merge branch 'master' into hints-owner-token
2019-01-28 08:28:58 +02:00
Shlomi Noach
3161cd5823
added: --hooks-hint-owner, --hooks-hint-token
2019-01-24 13:06:20 +02:00
Shlomi Noach
93b88e262a
Auto-merged master into gh-ost/patch-1 on deployment
2019-01-23 08:13:55 +02:00
twotwotwo
afa108f8fa
inspect: remove redundant join conditions
...
The TABLE_SCHEMA and TABLE_NAME are already guaranteed to have the same value in COLUMNS and UNIQUES because of the WHEREs in each query. Dropping it from the ON clause makes it complete much faster.
On (at least) MySQL 5.6 installs with thousands of tables, this query completes in a few seconds without the additional join conditions, but takes more than a minute with it.
2019-01-22 12:26:55 -08:00
Shlomi Noach
809908cb1d
Merge branch 'master' into ipv6
2019-01-20 09:02:34 +02:00
Shlomi Noach
5f587c3262
Adding --force-named-panic option
2019-01-14 13:27:44 +02:00
Shlomi Noach
d32304520c
Merge branch 'master' into minor_changes
2019-01-14 10:45:27 +02:00
Shlomi Noach
7c17cee010
reverting some changes
2019-01-01 11:47:41 +02:00
Shlomi Noach
0be91ba0f2
trying something...
2019-01-01 11:39:43 +02:00
Shlomi Noach
255314927d
Updated go-mysql library, now with fix to decimal. May break datetime
2019-01-01 10:57:46 +02:00
Shlomi Noach
419794e16d
Merge branch 'master' into master
2018-12-25 07:20:47 +02:00
黄恒
29e3d48c36
Merge branch 'master' into master
2018-12-11 13:12:47 +08:00
Eduardo Nunes
5f15f8a539
Remove not needed call by grouping columnLists
...
There is no need to call `applyColumnTypes` more than once for the same
`databaseName` and `tableName`, it is just move the additional
`columnList` to the first call.
2018-11-01 14:43:57 +01:00
Eduardo Nunes
dfc8aa28f4
Ignore not available columns when applying column types
...
The given `columnLists` may not contain all columns available in the
given table. This patch prevents the code to fail. Before this patch the
code was panicking whenever it was trying to set a value into a `nil`
object, e.g. `columnList.GetColumn('non-existant').Type = SomeType`.
For some reason the application was not completely failing but as a
side-effect any column after the non-existant column would never get its
Type properly set.
2018-11-01 14:33:11 +01:00
Shlomi Noach
60398e774f
Merge branch 'master' into add-dry-run-env
2018-10-02 14:08:08 +03:00
Shlomi Noach
6284a34823
Merge branch 'master' into ipv6
2018-10-02 08:12:15 +03:00
Shlomi Noach
7bd338faf7
Fix to retry logic in row copy
2018-09-20 10:49:21 +03:00
Jacob Bednarz
09a005d79e
Populate the env with dry run status
...
Updates the `applyEnvironmentVariables` function to populate whether or
not the current execution context is running as a dry run or not which
can then be used in hooks.
2018-09-18 14:41:26 +10:00
Shlomi Noach
04c0be6137
Merge branch 'master' into ipv6
2018-09-17 09:35:18 +03:00
Shlomi Noach
97c1e72dbe
Merge branch 'master' into minor_changes
2018-09-17 08:58:04 +03:00
Shlomi Noach
695e32d41b
Merge branch 'master' into dev_copyrow_hangs
2018-09-17 08:42:03 +03:00
Shlomi Noach
959d1af211
support ipv6 without port
2018-09-16 11:52:59 +03:00
Shlomi Noach
a7cfaa4d33
added testing
2018-09-16 11:48:15 +03:00
Shlomi Noach
49b80df27b
Parsing ipv6 addresses
2018-09-16 11:44:52 +03:00
Shlomi Noach
32f1cf1dbe
Support for GCP (Google Cloud Platform)
2018-09-02 09:51:40 +03:00
钟越
ef686a4e7b
Support database with underscore
2018-08-31 09:31:58 +08:00
wangfei
c7dff99a19
fix copyRowsFunc hangs bug
2018-07-26 03:02:12 +08:00
MOON_CLJ
14eda7efe0
fix GetReplicationLag not used args
2018-05-23 13:13:25 +08:00
MOON_CLJ
21d455013e
minor changes and typo correction
2018-05-23 13:13:25 +08:00
Shlomi Noach
db871b42c4
Support for GENERATED (aka virtual) columns
2018-05-22 12:36:52 +03:00
Shlomi Noach
dfeefed5dc
avoid prepared statements for changelog table
2018-05-20 13:46:33 +03:00
Shlomi Noach
46bead0369
Merge branch 'master' into fClose-Fix
2018-05-08 07:53:56 +03:00
Shlomi Noach
24ed4ce5e6
Merge branch 'master' into reject-rename-table
2018-05-07 08:04:47 +03:00
Shlomi Noach
fb00a13871
Rejecting RENAME TO|AS
2018-05-06 11:19:03 +03:00
Cyrill Schumacher
c6a6a533a1
go/base: Do not ignore f.Close error
2018-05-04 08:22:54 +02:00
Atsushi Ishibashi
99fcbc35f3
Fix custom type assignment
2018-05-04 01:45:14 +09:00
Shlomi Noach
160e7a11f5
Enforcing binlog_row_image=FULL
2018-04-24 05:56:03 -07:00
Shlomi Noach
3dc4930ae3
Merge branch 'master' into support-aliyun-rds
2018-04-16 14:17:03 +03:00
zj118228
d3b98d9e74
Refactor the code and remove the global variable of
...
support-aliyun-rds branch.
2018-03-29 12:20:41 +08:00
Shlomi Noach
b3f599acd8
Merge branch 'master' into support-aliyun-rds
2018-03-27 14:23:51 +03:00
Kurt Kotzur
15e7417fc5
update comment
2018-03-19 12:29:49 -07:00
Kurt Kotzur
117b197b2a
Obey defaultNumRetries in retryOperationWithExponentialBackoff; name max interval flag more generically ( #2 )
...
* rename flags, obey defaultNumRetries
* capitalization fixes
* fix flag description typo
* fix sleep algorithm
2018-03-19 12:26:46 -07:00
Kurt Kotzur
628983f78f
🎨
2018-03-16 12:42:38 -07:00
Kurt Kotzur
64f66c4abb
add back nonFatalHint, fix type mismatches
2018-03-16 10:54:37 -07:00
Kurt Kotzur
bd62b19b0b
remove nonFatalHint argument from retryOperation; add retryOperationWithExponentialBackoff and conditionally use it
2018-03-15 17:41:15 -07:00
Kurt Kotzur
3f0443833d
add flags for enabling exponential backoff and maximum backoff interval
2018-03-15 17:40:15 -07:00
Shlomi Noach
710abd5a5b
Fixed test
2018-03-12 16:20:46 +02:00
Shlomi Noach
2311df412d
gbk support, simplified
2018-03-12 16:17:53 +02:00
Shlomi Noach
bf01b31795
Merge branch 'master' into support-aliyun-rds
2018-03-07 16:39:55 +02:00
Shlomi Noach
2209136258
rename parameters
2018-03-07 16:30:02 +02:00
Shlomi Noach
1a882c6eb5
Merge branch 'master' into gbk_encoding
2018-02-27 14:06:59 +02:00
Shlomi Noach
e2f6f4bc36
Merge branch 'master' into gh-ost-ci-env
2018-02-27 13:26:56 +02:00
Shlomi Noach
9ae9cef17a
support quoted values in interactive commands
2018-02-25 19:17:37 +02:00
Shlomi Noach
9b0efd0d93
delegating to 127.0.0.1
2018-02-11 14:58:16 +02:00
zj118228
6f3d54a136
Aliyun RDS hide some mysql variables for secrity so gh-ost will get
...
ilegal values. Add --aliyun-rds flag to avoid getting them.
2018-01-23 14:44:22 +08:00
ceshihao
330650baa9
rename includeMultibyteCharset -> includeRiskCharset, multibyteCharset -> riskCharset
2018-01-17 00:15:50 +08:00
ceshihao
14315ee2cc
resolve merge conflict
2018-01-16 23:43:42 +08:00
ceshihao
346138772c
add an option --include-multibyte-charset
2018-01-16 23:43:33 +08:00
ceshihao
35becabf3c
support gbk encoding
2018-01-16 23:43:09 +08:00
Shlomi Noach
a01e3639a2
Merge branch 'master' into go-mysql-ignore-pass
2018-01-14 10:08:58 +02:00
Shlomi Noach
fcda14634d
go-mysql library to avoid printing password in cleartext
2018-01-11 14:51:14 +02:00
Shlomi Noach
02579075d0
Call the throttler.Teardown
2018-01-11 08:03:09 +02:00
Nikhil Mathew
e82d5633f9
Close the binlog syncer
2017-12-18 11:03:37 -08:00
Nikhil Mathew
ec6ceffbcb
Pass in a migrationContext UUID for a migration specific connections cache
2017-12-14 15:53:29 -08:00
Nikhil Mathew
fac1ba7026
Throttler teardown
2017-12-14 15:14:13 -08:00
Shlomi Noach
7ef284a3ad
removed redundant CanStopStreaming func
2017-12-11 08:02:32 +02:00
Shlomi Noach
0530b09700
Merge branch 'master' into nm-refactor-migration-context
2017-12-07 13:59:12 +02:00
Shlomi Noach
58c381f0a0
some cleanup
2017-11-21 09:14:04 +02:00
Shlomi Noach
203ea6c2cd
refactor, simplifid code
2017-11-20 10:24:28 +02:00
Shlomi Noach
3898d49f6c
supporting update to columns of migration key
2017-11-20 08:17:20 +02:00
Nikhil Mathew
538833ea84
Merge branch 'master' into nm-refactor-migration-context
2017-11-14 10:29:49 -08:00
Nikhil Mathew
2ad65ee1d7
Refactor usages of GetDB to use mysql
2017-11-10 15:44:22 -08:00
Nikhil Mathew
bb4a0be4c6
Add GetDB to mysql.GetDB
2017-11-10 15:41:37 -08:00
Nikhil Mathew
338a439c91
Remove GetDB from MigrationContext
2017-11-10 15:40:50 -08:00
Shlomi Noach
8a59d7e823
failing on PK value change
2017-11-08 11:11:17 +02:00
Josh Soref
15b8d5769b
spelling: unable
2017-11-08 01:02:47 +00:00
Josh Soref
6bc04eee62
spelling: thing
2017-11-08 01:02:32 +00:00
Josh Soref
cb97d6854c
spelling: synchronously
2017-11-08 01:02:21 +00:00
Josh Soref
94dfa0ed24
spelling: specified
2017-11-08 01:01:51 +00:00
Josh Soref
3196c890f5
spelling: running
2017-11-08 01:01:39 +00:00
Josh Soref
b3be5352c5
spelling: rotates
2017-11-08 00:56:14 +00:00
Josh Soref
4c93b7ac6d
spelling: response
2017-11-08 00:55:09 +00:00
Josh Soref
961e2409f6
spelling: proceeding
2017-11-08 00:50:56 +00:00
Josh Soref
6a8d97c13f
spelling: progress
2017-11-08 00:50:48 +00:00
Josh Soref
867e6a28b3
spelling: merely
2017-11-08 00:49:51 +00:00
Josh Soref
e2df0b80eb
spelling: iterating
2017-11-08 00:49:23 +00:00
Josh Soref
2b430e3cb6
spelling: ignoring
2017-11-08 00:49:06 +00:00
Josh Soref
ed35b75cc9
spelling: identified
2017-11-08 00:48:53 +00:00
Josh Soref
e608c16567
spelling: explicitly
2017-11-08 00:47:54 +00:00
Josh Soref
291c6d3594
spelling: entirely
2017-11-08 00:47:36 +00:00
Josh Soref
9bb6959d22
spelling: empty
2017-11-08 00:47:24 +00:00
Josh Soref
418462a6ca
spelling: dropping
2017-11-08 00:47:15 +00:00
Josh Soref
1ae6489afc
spelling: detached
2017-11-08 00:46:26 +00:00
Josh Soref
8901e6eec2
spelling: decision
2017-11-08 00:46:04 +00:00
Josh Soref
84be0562a0
spelling: coordinate
2017-11-08 00:45:47 +00:00
Josh Soref
e99333e576
spelling: conversion
2017-11-08 00:45:31 +00:00
Josh Soref
d29993ffda
spelling: changelog
2017-11-08 00:45:19 +00:00
Josh Soref
4dda9cf930
spelling: aggressive
2017-11-08 00:44:30 +00:00
Akshay Chhajed
05fc358ed4
send -help output to stdout
2017-11-01 00:24:09 +05:30
Akshay Chhajed
ccb7654235
Improved connection type logging
2017-10-29 19:53:32 +05:30
Shlomi Noach
087a6cc0cb
Merge branch 'master' into touch-postpone-flag-file
2017-10-17 16:02:11 +03:00
Nikhil Mathew
f06e23282e
Merge branch 'master' into nm-refactor-migration-context
2017-10-02 10:31:57 -07:00
Shlomi Noach
aff7413624
clearer error message when not able to create postpone-cut-over-flag-file
2017-10-02 16:00:58 +03:00
Shlomi Noach
c2186db527
Merge branch 'master' into touch-postpone-flag-file
2017-10-02 15:55:21 +03:00
Shlomi Noach
9890e66755
Merge pull request #491 from zmoazeni/enable-extra-port
...
Allow gh-ost to modify the server using extra port
2017-10-02 14:26:59 +03:00
Nikhil Mathew
84bdfdb1ad
Cache DB connection pools on the migrationContext where applicable
2017-09-22 16:06:06 -07:00