diff options
author | Zeev Suraski <zeev@php.net> | 2001-12-06 15:04:23 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2001-12-06 15:04:23 +0000 |
commit | 990e2612ccb80a09cf08df6ad2bf9c29d057c192 (patch) | |
tree | cf3b9c1bdb77b1b4df38f1ca62fe8dd3e976bac7 | |
parent | a702dc02f9d2f102c062f6bf58b1984f2305c828 (diff) | |
download | php-git-990e2612ccb80a09cf08df6ad2bf9c29d057c192.tar.gz |
Work around a quirk in the MySQL client library to fix unbuffered queries
-rw-r--r-- | ext/mysql/php_mysql.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 8b40ae1a63..12bde868e3 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -1004,10 +1004,12 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link 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; } |