Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go/logic/applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (this *Applier) CreateChangelogTable() error {
id bigint auto_increment,
last_update timestamp not null DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
hint varchar(64) charset ascii not null,
value varchar(255) charset ascii not null,
value varchar(4096) charset ascii not null,
primary key(id),
unique key hint_uidx(hint)
) auto_increment=256
Expand Down
3 changes: 3 additions & 0 deletions go/logic/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ func (this *Inspector) inspectOriginalAndGhostTables() (err error) {

// validateConnection issues a simple can-connect to MySQL
func (this *Inspector) validateConnection() error {
if len(this.connectionConfig.Password) > mysql.MaxReplicationPasswordLength {
return fmt.Errorf("MySQL replication length limited to 32 characters. See https://dev.mysql.com/doc/refman/5.7/en/assigning-passwords.html")
}
query := `select @@global.port, @@global.version`
var port int
if err := this.db.QueryRow(query).Scan(&port, &this.migrationContext.InspectorMySQLVersion); err != nil {
Expand Down
1 change: 1 addition & 0 deletions go/mysql/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
)

const MaxTableNameLength = 64
const MaxReplicationPasswordLength = 32

type ReplicationLagResult struct {
Key InstanceKey
Expand Down
7 changes: 7 additions & 0 deletions localtests/fail-password-length/create.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
drop table if exists gh_ost_test;
create table gh_ost_test (
id int auto_increment,
i int not null,
ts timestamp,
primary key(id)
) auto_increment=1;
1 change: 1 addition & 0 deletions localtests/fail-password-length/expect_failure
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MySQL replication length limited to 32 characters
1 change: 1 addition & 0 deletions localtests/fail-password-length/extra_args
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--password="0123456789abcdefghij0123456789abcdefghijxx"