Add PTDEVDEBUG statements to PerconaTest::wait_for_table().

This commit is contained in:
Daniel Nichter
2012-02-14 12:48:24 -07:00
parent fd9700757c
commit 815b406a40

View File

@@ -264,9 +264,15 @@ sub wait_for_table {
sub { sub {
my $r; my $r;
eval { $r = $dbh->selectrow_arrayref($sql); }; eval { $r = $dbh->selectrow_arrayref($sql); };
return 0 if $EVAL_ERROR; if ( $EVAL_ERROR ) {
if ( $where ) { PTDEVDEBUG && _d('Waiting on', $dbh, 'for table', $tbl,
return 0 unless $r && @$r; 'error:', $EVAL_ERROR);
return 0;
}
if ( $where && (!$r || !scalar @$r) ) {
PTDEVDEBUG && _d('Waiting on', $dbh, 'for table', $tbl,
'WHERE', $where);
return 0;
} }
return 1; return 1;
}, },