]> granicus.if.org Git - php/commitdiff
Fixed bug #40822 (pdo_mysql does not return rowCount() on select).
authorIlia Alshanetsky <iliaa@php.net>
Sun, 8 Apr 2007 15:26:21 +0000 (15:26 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 8 Apr 2007 15:26:21 +0000 (15:26 +0000)
NEWS
ext/pdo_mysql/mysql_statement.c

diff --git a/NEWS b/NEWS
index 969f1362b57db3fc46b14d167fdd04c4819e2621..b343806941c3924ec7408892073aefbb2055e350 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? 2007, PHP 5.2.2
+05 Apr 2007, PHP 5.2.2RC1
 - Improved bundled GD
   . Sync to 2.0.35
   . colors allocated henceforth from the resulting image overwrite the palette 
@@ -66,6 +66,7 @@ PHP                                                                        NEWS
 - Fixed bug #40836 (Segfault in ext/dom). (Rob)
 - Fixed bug #40833 (Crash when using unset() on an ArrayAccess object retrieved
   via __get()). (Dmitry)
+- Fixed bug #40822 (pdo_mysql does not return rowCount() on select). (Ilia)
 - Fixed bug #40815 (using strings like "class::func" and static methods in 
   set_exception_handler() might result in crash). (Tony)
 - Fixed bug #40809 (Poor performance of ".="). (Dmitry)
index 830eb950a6160a9b715e81f3ed81ff4338b1c7a2..aae7019dc5e1bc7f2c70dffc639c21b3cd42aa43 100755 (executable)
@@ -231,7 +231,7 @@ static int pdo_mysql_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
                        return 0;
                }
 
-               stmt->row_count = 0;
+               stmt->row_count = mysql_num_rows(S->result);
 
                if (!stmt->executed) {
                        stmt->column_count = (int) mysql_num_fields(S->result);