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:
Carlos Salguero
2017-08-15 12:06:24 -03:00
parent c375fd068b
commit 54dfcf36de
13 changed files with 129 additions and 31 deletions

View File

@@ -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 ) {