mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-21 18:24:38 +00:00
Re-added comments to the skipped MariaDB warning in pt-osc, and ported back the changes to enable MariaDB sandboxes
This commit is contained in:
@@ -9777,6 +9777,9 @@ sub exec_nibble {
|
|||||||
# Ignore this warning because we have purposely set statement-based
|
# Ignore this warning because we have purposely set statement-based
|
||||||
# replication.
|
# replication.
|
||||||
1592 => 1,
|
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,
|
1062 => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -27,6 +27,13 @@ debug_sandbox() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mysql_upgrade_on() {
|
||||||
|
local cnf_file="$1"
|
||||||
|
local upgrade="$(which mysql_upgrade)"
|
||||||
|
|
||||||
|
$upgrade --defaults-file=$cnf_file --skip-write-binlog
|
||||||
|
}
|
||||||
|
|
||||||
make_sandbox() {
|
make_sandbox() {
|
||||||
# Make the sandbox dir and extract the base files.
|
# Make the sandbox dir and extract the base files.
|
||||||
rm -rf /tmp/$port || die "Failed to rm /tmp/$port"
|
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 "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, '')";
|
/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 the sandbox is a slave, start the slave.
|
||||||
if [ "$type" = "slave" ]; then
|
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"
|
/tmp/$port/use -e "change master to master_host='127.0.0.1', master_user='msandbox', master_password='msandbox', master_port=$master_port"
|
||||||
|
Reference in New Issue
Block a user