Permalink
Browse files

fix return value of MiniDBD::mysql::StatementHandle execute()

  • Loading branch information...
1 parent e900311 commit 8863e734dceaf73d6354eaebd8f5aa98074a7d70 @cxreg cxreg committed Jul 22, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/MiniDBD/mysql.pm6
View
@@ -144,9 +144,11 @@ class MiniDBD::mysql::StatementHandle does MiniDBD::StatementHandle {
$!errstr = mysql_error( $!mysql_client );
if $!RaiseError { die $!errstr; }
}
- return !defined $!errstr;
+
+ my $rows = self.rows;
+ return ($rows == 0) ?? "0E0" !! $rows;
}
-
+
# do() and execute() return the number of affected rows directly or:
# rows() is called on the statement handle $sth.
method rows() {

0 comments on commit 8863e73

Please sign in to comment.