Update diff_rows.t and diff_warnings.t.

This commit is contained in:
Daniel Nichter
2013-02-18 19:27:06 -07:00
parent 6f735bfb3a
commit 36e8696479
4 changed files with 32 additions and 30 deletions

View File

@@ -5328,7 +5328,7 @@ sub exec_event {
my $t1 = time - $t0;
$results->{query_time} = sprintf('%.6f', $t1);
$results->{sth} = $sth;
$results->{warnings} = $self->get_warnings(host => $host);
$results->{warnings} = $self->get_warnings(dbh => $host->dbh);
};
if ( $EVAL_ERROR ) {
PTDEBUG && _d($EVAL_ERROR);
@@ -5341,12 +5341,12 @@ sub exec_event {
sub get_warnings {
my ($self, %args) = @_;
my @required_args = qw(host);
my @required_args = qw(dbh);
foreach my $arg ( @required_args ) {
die "I need a $arg argument" unless $args{$arg};
}
my $host = $args{host};
my $warnings = $host->dbh->selectall_hashref('SHOW WARNINGS', 'code');
my $dbh = $args{dbh};
my $warnings = $dbh->selectall_hashref('SHOW WARNINGS', 'code');
return $warnings;
}