File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ func (this *Applier) CreateChangelogTable() error {
200200 id bigint auto_increment,
201201 last_update timestamp not null DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
202202 hint varchar(64) charset ascii not null,
203- value varchar(255 ) charset ascii not null,
203+ value varchar(4096 ) charset ascii not null,
204204 primary key(id),
205205 unique key hint_uidx(hint)
206206 ) auto_increment=256
Original file line number Diff line number Diff line change @@ -169,6 +169,9 @@ func (this *Inspector) inspectOriginalAndGhostTables() (err error) {
169169
170170// validateConnection issues a simple can-connect to MySQL
171171func (this * Inspector ) validateConnection () error {
172+ if len (this .connectionConfig .Password ) > mysql .MaxReplicationPasswordLength {
173+ return fmt .Errorf ("MySQL replication length limited to 32 characters. See https://dev.mysql.com/doc/refman/5.7/en/assigning-passwords.html" )
174+ }
172175 query := `select @@global.port, @@global.version`
173176 var port int
174177 if err := this .db .QueryRow (query ).Scan (& port , & this .migrationContext .InspectorMySQLVersion ); err != nil {
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import (
1717)
1818
1919const MaxTableNameLength = 64
20+ const MaxReplicationPasswordLength = 32
2021
2122type ReplicationLagResult struct {
2223 Key InstanceKey
You can’t perform that action at this time.
0 commit comments