]> granicus.if.org Git - php/commitdiff
Fix problems with the unbuffered set detection, for libmysql, which resulted
authorAndrey Hristov <andrey@php.net>
Tue, 6 Sep 2011 19:52:19 +0000 (19:52 +0000)
committerAndrey Hristov <andrey@php.net>
Tue, 6 Sep 2011 19:52:19 +0000 (19:52 +0000)
in always true. Thanks Stas.

ext/mysqli/mysqli_libmysql.h
ext/mysqli/tests/bug55582.phpt

index 98e18fcfcda4e7ac98142dd68c728fe956e930f8..c3f6de583b05fe705d6344e415752d08ef3228ef 100644 (file)
@@ -29,8 +29,8 @@
 #define MYSQLND_OPT_INT_AND_YEAR_AS_INT                                201
 
 /* r->data should be always NULL, at least in recent libmysql versions, the status changes once data is read*/
-#define mysqli_result_is_unbuffered(r)         (((r)->handle && (r)->handle->status == MYSQL_STATUS_USE_RESULT) || ((r)->data == NULL))
-#define mysqli_result_is_unbuffered_and_not_everything_is_fetched(r)           (((r)->handle && (r)->handle->status == MYSQL_STATUS_USE_RESULT) || ((r)->data == NULL))
+#define mysqli_result_is_unbuffered(r)         ((r)->handle && (r)->handle->status == MYSQL_STATUS_USE_RESULT && (r)->data == NULL)
+#define mysqli_result_is_unbuffered_and_not_everything_is_fetched(r)  mysqli_result_is_unbuffered(r)
 #define mysqli_server_status(c)                                (c)->server_status
 #define mysqli_stmt_get_id(s)                          ((s)->stmt_id)
 #define mysqli_stmt_warning_count(s)           mysql_warning_count((s)->mysql)
index 5b38f3f803eda30c0f4671edfe241e312ebbc477..393384514739b15b1dc5940ed993f2f67048a456 100644 (file)
@@ -5,7 +5,6 @@ Bug #55582 mysqli_num_rows() returns always 0 for unbuffered, when mysqlnd is us
 require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 require_once("connect.inc");
-if(!$IS_MYSQLND) die("skip This bug is for mysqlnd only");
 ?>
 --FILE--
 <?php