diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index f76e8723..c52e5bad 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -9777,6 +9777,9 @@ sub exec_nibble { # Ignore this warning because we have purposely set statement-based # replication. 1592 => 1, + # Error: 1062 SQLSTATE: 23000 ( ER_DUP_ENTRY ) + # Message: Duplicate entry '%ld' for key '%s' + # MariaDB 5.5.28+ has this as a warning; See https://bugs.launchpad.net/percona-toolkit/+bug/1099836 1062 => 1, ); diff --git a/sandbox/start-sandbox b/sandbox/start-sandbox index df668b1f..5b7e0179 100755 --- a/sandbox/start-sandbox +++ b/sandbox/start-sandbox @@ -27,6 +27,13 @@ debug_sandbox() { fi } +mysql_upgrade_on() { + local cnf_file="$1" + local upgrade="$(which mysql_upgrade)" + + $upgrade --defaults-file=$cnf_file --skip-write-binlog +} + make_sandbox() { # Make the sandbox dir and extract the base files. rm -rf /tmp/$port || die "Failed to rm /tmp/$port" @@ -138,6 +145,10 @@ make_sandbox() { /tmp/$port/use -e "CREATE TABLE IF NOT EXISTS percona_test.sentinel (id INT PRIMARY KEY, ping VARCHAR(64) NOT NULL DEFAULT '')"; /tmp/$port/use -e "REPLACE INTO percona_test.sentinel (id, ping) VALUES (1, '')"; + if [ -n "${MYSQL_UPGRADE:-""}" ]; then + mysql_upgrade_on /tmp/$port/my.sandbox.cnf + fi + # If the sandbox is a slave, start the slave. if [ "$type" = "slave" ]; then /tmp/$port/use -e "change master to master_host='127.0.0.1', master_user='msandbox', master_password='msandbox', master_port=$master_port"