mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 15:31:55 +00:00
PT-193 New test and updated libraries
Added a specific test for this issue and updated all binaries to the latest TableParser version
This commit is contained in:
@@ -1954,7 +1954,7 @@ sub parse {
|
||||
my ($name) = $ddl =~ m/CREATE (?:TEMPORARY )?TABLE\s+(`.+?`)/;
|
||||
(undef, $name) = $self->{Quoter}->split_unquote($name) if $name;
|
||||
|
||||
$ddl =~ s/(`[^`]+`)/\L$1/g;
|
||||
$ddl =~ s/(`[^`\n]+`)/\L$1/gm;
|
||||
|
||||
my $engine = $self->get_engine($ddl);
|
||||
|
||||
@@ -2085,6 +2085,8 @@ sub check_table {
|
||||
my $db_tbl = $q->quote($db, $tbl);
|
||||
PTDEBUG && _d('Checking', $db_tbl);
|
||||
|
||||
$self->{check_table_error} = undef;
|
||||
|
||||
my $sql = "SHOW TABLES FROM " . $q->quote($db)
|
||||
. ' LIKE ' . $q->literal_like($tbl);
|
||||
PTDEBUG && _d($sql);
|
||||
@@ -2092,8 +2094,9 @@ sub check_table {
|
||||
eval {
|
||||
$row = $dbh->selectrow_arrayref($sql);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d($EVAL_ERROR);
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
PTDEBUG && _d($e);
|
||||
$self->{check_table_error} = $e;
|
||||
return 0;
|
||||
}
|
||||
if ( !$row->[0] || $row->[0] ne $tbl ) {
|
||||
|
Reference in New Issue
Block a user