Merge ptc-ignore-tables-bug-1304062.

This commit is contained in:
Daniel Nichter
2014-05-27 09:50:28 -07:00
6 changed files with 36 additions and 26 deletions

View File

@@ -3240,7 +3240,7 @@ sub _make_filters {
my ($db, $tbl) = $q->split_unquote($obj);
$db ||= '*';
PTDEBUG && _d('Filter', $filter, 'value:', $db, $tbl);
$filters{$filter}->{$tbl} = $db;
$filters{$filter}->{$db}->{$tbl} = 1;
}
else { # database
PTDEBUG && _d('Filter', $filter, 'value:', $obj);
@@ -3506,9 +3506,8 @@ sub table_is_allowed {
|slave_worker_info
)$/x;
if ( $filter->{'ignore-tables'}->{$tbl}
&& ($filter->{'ignore-tables'}->{$tbl} eq '*'
|| $filter->{'ignore-tables'}->{$tbl} eq $db) ) {
if ( $filter->{'ignore-tables'}->{'*'}->{$tbl}
|| $filter->{'ignore-tables'}->{$db}->{$tbl}) {
PTDEBUG && _d('Table', $tbl, 'is in --ignore-tables list');
return 0;
}
@@ -3520,7 +3519,7 @@ sub table_is_allowed {
}
if ( $filter->{'tables'}
&& !$filter->{'tables'}->{$tbl} ) {
&& (!$filter->{'tables'}->{'*'}->{$tbl} && !$filter->{'tables'}->{$db}->{$tbl}) ) {
PTDEBUG && _d('Table', $tbl, 'is not in --tables list, ignoring');
return 0;
}