File tree Expand file tree Collapse file tree 6 files changed +14
-1
lines changed
localtests/fail-password-length Expand file tree Collapse file tree 6 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ func (this *Applier) CreateChangelogTable() error {
200
200
id bigint auto_increment,
201
201
last_update timestamp not null DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
202
202
hint varchar(64) charset ascii not null,
203
- value varchar(255 ) charset ascii not null,
203
+ value varchar(4096 ) charset ascii not null,
204
204
primary key(id),
205
205
unique key hint_uidx(hint)
206
206
) auto_increment=256
Original file line number Diff line number Diff line change @@ -192,6 +192,9 @@ func (this *Inspector) inspectOriginalAndGhostTables() (err error) {
192
192
193
193
// validateConnection issues a simple can-connect to MySQL
194
194
func (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
+ }
195
198
query := `select @@global.port, @@global.version`
196
199
var port int
197
200
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 (
17
17
)
18
18
19
19
const MaxTableNameLength = 64
20
+ const MaxReplicationPasswordLength = 32
20
21
21
22
type ReplicationLagResult struct {
22
23
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