mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-19 00:43:58 +00:00
fixed --ignore-tables in SchemaIterator.pm - bug 1304062
This commit is contained in:
@@ -3240,7 +3240,7 @@ sub _make_filters {
|
|||||||
my ($db, $tbl) = $q->split_unquote($obj);
|
my ($db, $tbl) = $q->split_unquote($obj);
|
||||||
$db ||= '*';
|
$db ||= '*';
|
||||||
PTDEBUG && _d('Filter', $filter, 'value:', $db, $tbl);
|
PTDEBUG && _d('Filter', $filter, 'value:', $db, $tbl);
|
||||||
$filters{$filter}->{$tbl} = $db;
|
$filters{$filter}->{$db}->{$tbl} = 1;
|
||||||
}
|
}
|
||||||
else { # database
|
else { # database
|
||||||
PTDEBUG && _d('Filter', $filter, 'value:', $obj);
|
PTDEBUG && _d('Filter', $filter, 'value:', $obj);
|
||||||
@@ -3506,9 +3506,8 @@ sub table_is_allowed {
|
|||||||
|slave_worker_info
|
|slave_worker_info
|
||||||
)$/x;
|
)$/x;
|
||||||
|
|
||||||
if ( $filter->{'ignore-tables'}->{$tbl}
|
if ( $filter->{'ignore-tables'}->{'*'}->{$tbl}
|
||||||
&& ($filter->{'ignore-tables'}->{$tbl} eq '*'
|
|| $filter->{'ignore-tables'}->{$db}->{$tbl}) {
|
||||||
|| $filter->{'ignore-tables'}->{$tbl} eq $db) ) {
|
|
||||||
PTDEBUG && _d('Table', $tbl, 'is in --ignore-tables list');
|
PTDEBUG && _d('Table', $tbl, 'is in --ignore-tables list');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -3520,7 +3519,7 @@ sub table_is_allowed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $filter->{'tables'}
|
if ( $filter->{'tables'}
|
||||||
&& !$filter->{'tables'}->{$tbl} ) {
|
&& (!$filter->{'tables'}->{'*'}->{$tbl} && !$filter->{'tables'}->{$db}->{$tbl}) ) {
|
||||||
PTDEBUG && _d('Table', $tbl, 'is not in --tables list, ignoring');
|
PTDEBUG && _d('Table', $tbl, 'is not in --tables list, ignoring');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -3993,7 +3993,7 @@ sub _make_filters {
|
|||||||
my ($db, $tbl) = $q->split_unquote($obj);
|
my ($db, $tbl) = $q->split_unquote($obj);
|
||||||
$db ||= '*';
|
$db ||= '*';
|
||||||
PTDEBUG && _d('Filter', $filter, 'value:', $db, $tbl);
|
PTDEBUG && _d('Filter', $filter, 'value:', $db, $tbl);
|
||||||
$filters{$filter}->{$tbl} = $db;
|
$filters{$filter}->{$db}->{$tbl} = 1;
|
||||||
}
|
}
|
||||||
else { # database
|
else { # database
|
||||||
PTDEBUG && _d('Filter', $filter, 'value:', $obj);
|
PTDEBUG && _d('Filter', $filter, 'value:', $obj);
|
||||||
@@ -4259,9 +4259,8 @@ sub table_is_allowed {
|
|||||||
|slave_worker_info
|
|slave_worker_info
|
||||||
)$/x;
|
)$/x;
|
||||||
|
|
||||||
if ( $filter->{'ignore-tables'}->{$tbl}
|
if ( $filter->{'ignore-tables'}->{'*'}->{$tbl}
|
||||||
&& ($filter->{'ignore-tables'}->{$tbl} eq '*'
|
|| $filter->{'ignore-tables'}->{$db}->{$tbl}) {
|
||||||
|| $filter->{'ignore-tables'}->{$tbl} eq $db) ) {
|
|
||||||
PTDEBUG && _d('Table', $tbl, 'is in --ignore-tables list');
|
PTDEBUG && _d('Table', $tbl, 'is in --ignore-tables list');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -4273,7 +4272,7 @@ sub table_is_allowed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $filter->{'tables'}
|
if ( $filter->{'tables'}
|
||||||
&& !$filter->{'tables'}->{$tbl} ) {
|
&& (!$filter->{'tables'}->{'*'}->{$tbl} && !$filter->{'tables'}->{$db}->{$tbl}) ) {
|
||||||
PTDEBUG && _d('Table', $tbl, 'is not in --tables list, ignoring');
|
PTDEBUG && _d('Table', $tbl, 'is not in --tables list, ignoring');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -7241,7 +7241,7 @@ sub _make_filters {
|
|||||||
my ($db, $tbl) = $q->split_unquote($obj);
|
my ($db, $tbl) = $q->split_unquote($obj);
|
||||||
$db ||= '*';
|
$db ||= '*';
|
||||||
PTDEBUG && _d('Filter', $filter, 'value:', $db, $tbl);
|
PTDEBUG && _d('Filter', $filter, 'value:', $db, $tbl);
|
||||||
$filters{$filter}->{$tbl} = $db;
|
$filters{$filter}->{$db}->{$tbl} = 1;
|
||||||
}
|
}
|
||||||
else { # database
|
else { # database
|
||||||
PTDEBUG && _d('Filter', $filter, 'value:', $obj);
|
PTDEBUG && _d('Filter', $filter, 'value:', $obj);
|
||||||
@@ -7507,9 +7507,8 @@ sub table_is_allowed {
|
|||||||
|slave_worker_info
|
|slave_worker_info
|
||||||
)$/x;
|
)$/x;
|
||||||
|
|
||||||
if ( $filter->{'ignore-tables'}->{$tbl}
|
if ( $filter->{'ignore-tables'}->{'*'}->{$tbl}
|
||||||
&& ($filter->{'ignore-tables'}->{$tbl} eq '*'
|
|| $filter->{'ignore-tables'}->{$db}->{$tbl}) {
|
||||||
|| $filter->{'ignore-tables'}->{$tbl} eq $db) ) {
|
|
||||||
PTDEBUG && _d('Table', $tbl, 'is in --ignore-tables list');
|
PTDEBUG && _d('Table', $tbl, 'is in --ignore-tables list');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -7521,7 +7520,7 @@ sub table_is_allowed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $filter->{'tables'}
|
if ( $filter->{'tables'}
|
||||||
&& !$filter->{'tables'}->{$tbl} ) {
|
&& (!$filter->{'tables'}->{'*'}->{$tbl} && !$filter->{'tables'}->{$db}->{$tbl}) ) {
|
||||||
PTDEBUG && _d('Table', $tbl, 'is not in --tables list, ignoring');
|
PTDEBUG && _d('Table', $tbl, 'is not in --tables list, ignoring');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -7567,7 +7567,7 @@ sub _make_filters {
|
|||||||
my ($db, $tbl) = $q->split_unquote($obj);
|
my ($db, $tbl) = $q->split_unquote($obj);
|
||||||
$db ||= '*';
|
$db ||= '*';
|
||||||
PTDEBUG && _d('Filter', $filter, 'value:', $db, $tbl);
|
PTDEBUG && _d('Filter', $filter, 'value:', $db, $tbl);
|
||||||
$filters{$filter}->{$tbl} = $db;
|
$filters{$filter}->{$db}->{$tbl} = 1;
|
||||||
}
|
}
|
||||||
else { # database
|
else { # database
|
||||||
PTDEBUG && _d('Filter', $filter, 'value:', $obj);
|
PTDEBUG && _d('Filter', $filter, 'value:', $obj);
|
||||||
@@ -7833,9 +7833,8 @@ sub table_is_allowed {
|
|||||||
|slave_worker_info
|
|slave_worker_info
|
||||||
)$/x;
|
)$/x;
|
||||||
|
|
||||||
if ( $filter->{'ignore-tables'}->{$tbl}
|
if ( $filter->{'ignore-tables'}->{'*'}->{$tbl}
|
||||||
&& ($filter->{'ignore-tables'}->{$tbl} eq '*'
|
|| $filter->{'ignore-tables'}->{$db}->{$tbl}) {
|
||||||
|| $filter->{'ignore-tables'}->{$tbl} eq $db) ) {
|
|
||||||
PTDEBUG && _d('Table', $tbl, 'is in --ignore-tables list');
|
PTDEBUG && _d('Table', $tbl, 'is in --ignore-tables list');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -7847,7 +7846,7 @@ sub table_is_allowed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $filter->{'tables'}
|
if ( $filter->{'tables'}
|
||||||
&& !$filter->{'tables'}->{$tbl} ) {
|
&& (!$filter->{'tables'}->{'*'}->{$tbl} && !$filter->{'tables'}->{$db}->{$tbl}) ) {
|
||||||
PTDEBUG && _d('Table', $tbl, 'is not in --tables list, ignoring');
|
PTDEBUG && _d('Table', $tbl, 'is not in --tables list, ignoring');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -151,7 +151,7 @@ sub _make_filters {
|
|||||||
# See table_is_allowed().
|
# See table_is_allowed().
|
||||||
$db ||= '*';
|
$db ||= '*';
|
||||||
PTDEBUG && _d('Filter', $filter, 'value:', $db, $tbl);
|
PTDEBUG && _d('Filter', $filter, 'value:', $db, $tbl);
|
||||||
$filters{$filter}->{$tbl} = $db;
|
$filters{$filter}->{$db}->{$tbl} = 1;
|
||||||
}
|
}
|
||||||
else { # database
|
else { # database
|
||||||
PTDEBUG && _d('Filter', $filter, 'value:', $obj);
|
PTDEBUG && _d('Filter', $filter, 'value:', $obj);
|
||||||
@@ -457,9 +457,8 @@ sub table_is_allowed {
|
|||||||
|slave_worker_info
|
|slave_worker_info
|
||||||
)$/x;
|
)$/x;
|
||||||
|
|
||||||
if ( $filter->{'ignore-tables'}->{$tbl}
|
if ( $filter->{'ignore-tables'}->{'*'}->{$tbl}
|
||||||
&& ($filter->{'ignore-tables'}->{$tbl} eq '*'
|
|| $filter->{'ignore-tables'}->{$db}->{$tbl}) {
|
||||||
|| $filter->{'ignore-tables'}->{$tbl} eq $db) ) {
|
|
||||||
PTDEBUG && _d('Table', $tbl, 'is in --ignore-tables list');
|
PTDEBUG && _d('Table', $tbl, 'is in --ignore-tables list');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -471,7 +470,7 @@ sub table_is_allowed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $filter->{'tables'}
|
if ( $filter->{'tables'}
|
||||||
&& !$filter->{'tables'}->{$tbl} ) {
|
&& (!$filter->{'tables'}->{'*'}->{$tbl} && !$filter->{'tables'}->{$db}->{$tbl}) ) {
|
||||||
PTDEBUG && _d('Table', $tbl, 'is not in --tables list, ignoring');
|
PTDEBUG && _d('Table', $tbl, 'is not in --tables list, ignoring');
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -580,5 +580,6 @@ test_so(
|
|||||||
# #############################################################################
|
# #############################################################################
|
||||||
# Done.
|
# Done.
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
|
$sb->wipe_clean($dbh);
|
||||||
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
|
||||||
done_testing;
|
done_testing;
|
||||||
|
Reference in New Issue
Block a user