Fix for 1047335: SchemaIterator fails when it encounters a crashed table

This commit is contained in:
Brian Fraser
2012-10-30 18:35:49 -03:00
parent d616a7e5e6
commit 35f5f8d1e4
18 changed files with 232 additions and 68 deletions

View File

@@ -82,18 +82,12 @@ sub get_create_table {
PTDEBUG && _d($show_sql);
my $href;
eval { $href = $dbh->selectrow_hashref($show_sql); };
if ( $EVAL_ERROR ) {
# TODO: I think we fail silently for tools which may try to call
# this on temp tables, or don't care if the table goes away. We
# should warn $EVAL_ERROR and require callers to eval us and do
# what they want with the warning.
PTDEBUG && _d($EVAL_ERROR);
if ( my $e = $EVAL_ERROR ) {
# Restore old SQL mode.
PTDEBUG && _d($old_sql_mode);
$dbh->do($old_sql_mode);
return;
die $e;
}
# Restore old SQL mode.