mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-08 21:27:41 +00:00
Merged fix-1099836-pt-osc-mariadb-2.1.9
This commit is contained in:
@@ -3270,7 +3270,7 @@ sub check_table {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my ($dbh, $db, $tbl) = @args{@required_args};
|
||||
my $q = $self->{Quoter};
|
||||
my $q = $self->{Quoter} || 'Quoter';
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
@@ -9777,6 +9777,10 @@ 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,
|
||||
);
|
||||
|
||||
# Warn once per-table for these error codes if the error message
|
||||
@@ -9851,6 +9855,7 @@ sub exec_nibble {
|
||||
. "Specify --statistics to see a count of all "
|
||||
. "suppressed warnings and errors.\n";
|
||||
}
|
||||
warn $err;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@@ -302,7 +302,7 @@ sub check_table {
|
||||
die "I need a $arg argument" unless $args{$arg};
|
||||
}
|
||||
my ($dbh, $db, $tbl) = @args{@required_args};
|
||||
my $q = $self->{Quoter};
|
||||
my $q = $self->{Quoter} || 'Quoter';
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user