cvs: php4(PHP_4_0_7) /ext/mysql php_mysql.c
| From: | Zeev Suraski | Date: | Sun, 09 Dec 2001 13:53:57 +0000 |
| Subject: | cvs: php4(PHP_4_0_7) /ext/mysql php_mysql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-8531@lists.php.net to get a copy of this message | ||
zeev Sun Dec 9 08:53:57 2001 EDT
Modified files: (Branch: PHP_4_0_7)
/php4/ext/mysql php_mysql.c
Log:
MFH - fix unbuffered queries
Index: php4/ext/mysql/php_mysql.c
diff -u php4/ext/mysql/php_mysql.c:1.97.2.2 php4/ext/mysql/php_mysql.c:1.97.2.3
--- php4/ext/mysql/php_mysql.c:1.97.2.2 Fri Nov 2 09:29:50 2001
+++ php4/ext/mysql/php_mysql.c Sun Dec 9 08:53:56 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.c,v 1.97.2.2 2001/11/02 14:29:50 sniper Exp $ */
+/* $Id: php_mysql.c,v 1.97.2.3 2001/12/09 13:53:56 zeev Exp $ */
/* TODO:
@@ -993,10 +993,12 @@
MYSQL_RES *mysql_result;
mysql_result = (MYSQL_RES *) zend_list_find(mysql->active_result_id, &type);
- if (mysql_result && type==le_result && !mysql_eof(mysql_result)) {
- php_error(E_NOTICE, "Called %s() without first fetching all rows from a previous unbuffered
query",
- get_active_function_name(TSRMLS_C));
- while (mysql_fetch_row(mysql_result));
+ if (mysql_result && type==le_result) {
+ if (!mysql_eof(mysql_result)) {
+ php_error(E_NOTICE, "Called %s() without first fetching all rows from a previous
unbuffered query",
+ get_active_function_name(TSRMLS_C));
+ while (mysql_fetch_row(mysql_result));
+ }
zend_list_delete(mysql->active_result_id);
mysql->active_result_id = 0;
}