File tree Expand file tree Collapse file tree
localtests/fail-password-length 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 @@ -192,6 +192,9 @@ func (this *Inspector) inspectOriginalAndGhostTables() (err error) {
192192
193193// validateConnection issues a simple can-connect to MySQL
194194func (this * Inspector ) validateConnection () error {
195+ if len (this .connectionConfig .Password ) > mysql .MaxReplicationPasswordLength {
196+ return fmt .Errorf ("MySQL replication length limited to 32 characters. See https://dev.mysql.com/doc/refman/5.7/en/assigning-passwords.html" )
197+ }
195198 query := `select @@global.port, @@global.version`
196199 var port int
197200 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
Original file line number Diff line number Diff line change 1+ drop table if exists gh_ost_test;
2+ create table gh_ost_test (
3+ id int auto_increment,
4+ i int not null ,
5+ ts timestamp ,
6+ primary key (id)
7+ ) auto_increment= 1 ;
Original file line number Diff line number Diff line change 1+ MySQL replication length limited to 32 characters
Original file line number Diff line number Diff line change 1+ --password="0123456789abcdefghij0123456789abcdefghijxx"
You can’t perform that action at this time.
0 commit comments