From: Ilia Alshanetsky Date: Sun, 8 Apr 2007 15:26:21 +0000 (+0000) Subject: Fixed bug #40822 (pdo_mysql does not return rowCount() on select). X-Git-Tag: php-5.2.2RC1~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65afdf097c31f0a8ad40b47868550da7a53f80a3;p=php Fixed bug #40822 (pdo_mysql does not return rowCount() on select). --- diff --git a/NEWS b/NEWS index 969f1362b5..b343806941 100644 --- 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) diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index 830eb950a6..aae7019dc5 100755 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -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);