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 {
my $r;
eval { $r = $dbh->selectrow_arrayref($sql); };
return 0 if $EVAL_ERROR;
if ( $where ) {
return 0 unless $r && @$r;
if ( $EVAL_ERROR ) {
PTDEVDEBUG && _d('Waiting on', $dbh, 'for table', $tbl,
'error:', $EVAL_ERROR);
return 0;
}
if ( $where && (!$r || !scalar @$r) ) {
PTDEVDEBUG && _d('Waiting on', $dbh, 'for table', $tbl,
'WHERE', $where);
return 0;
}
return 1;
},