mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-12 14:18:32 +00:00
Resolved a pending merge conflict.
The fix for https://bugs.launchpad.net/percona-toolkit/+bug/916168 was affecting the same code as this fix. This commit mimicks that fix, and removes the privs checks.
This commit is contained in:
@@ -8189,11 +8189,19 @@ sub check_repl_table {
|
|||||||
|
|
||||||
# Always create the table, unless --no-create-replicate-table
|
# Always create the table, unless --no-create-replicate-table
|
||||||
# was passed in; see https://bugs.launchpad.net/percona-toolkit/+bug/950294
|
# was passed in; see https://bugs.launchpad.net/percona-toolkit/+bug/950294
|
||||||
if ( !$tbl_exists && !$o->get('create-replicate-table') ) {
|
if ( !$tbl_exists ) {
|
||||||
die "--replicate table $repl_table does not exist and "
|
if ( !$o->get('create-replicate-table') ) {
|
||||||
. "--no-create-replicate-table was specified. "
|
die "--replicate table $repl_table does not exist and "
|
||||||
. "You need to create the table.\n";
|
. "--no-create-replicate-table was specified. "
|
||||||
|
. "You need to create the table.\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
PTDEBUG && _d('--replicate table', $repl_table, 'already exists');
|
||||||
|
# We used to check the table privs here, but:
|
||||||
|
# https://bugs.launchpad.net/percona-toolkit/+bug/916168
|
||||||
|
}
|
||||||
|
|
||||||
if ( $o->get('create-replicate-table') ) {
|
if ( $o->get('create-replicate-table') ) {
|
||||||
local $@;
|
local $@;
|
||||||
eval {
|
eval {
|
||||||
@@ -8216,16 +8224,6 @@ sub check_repl_table {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check it again but this time check the privs.
|
|
||||||
my $have_tbl_privs = $tp->check_table(
|
|
||||||
dbh => $dbh,
|
|
||||||
db => $db,
|
|
||||||
tbl => $tbl,
|
|
||||||
all_privs => 1,
|
|
||||||
);
|
|
||||||
die "User does not have all privileges on --replicate table "
|
|
||||||
. "$repl_table.\n" unless $have_tbl_privs;
|
|
||||||
|
|
||||||
# Check and wait for the repl table to appear on all slaves.
|
# Check and wait for the repl table to appear on all slaves.
|
||||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1008778
|
# https://bugs.launchpad.net/percona-toolkit/+bug/1008778
|
||||||
if ( scalar @$slaves ) {
|
if ( scalar @$slaves ) {
|
||||||
|
Reference in New Issue
Block a user