andrey Tue, 13 Jul 2010 13:02:00 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=301234
Log:
Give an error when USE_RESULT is used with fetch_all
Changed paths:
U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
U php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c
Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c 2010-07-13
12:45:00 UTC (rev 301233)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c 2010-07-13
13:02:00 UTC (rev 301234)
@@ -1569,6 +1569,10 @@
/* mysqlnd_res::fetch_all works with buffered resultsets only */
if (result->unbuf || (!result->unbuf && !set)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "fetch_all can be
used only with buffered sets");
+ if (result->conn) {
+ SET_CLIENT_ERROR(result->conn->error_info,
CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "fetch_all can be used only with buffered
sets");
+ }
RETVAL_NULL();
DBG_VOID_RETURN;
}
Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c 2010-07-13 12:45:00 UTC
(rev 301233)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c 2010-07-13 13:02:00 UTC
(rev 301234)
@@ -1569,6 +1569,10 @@
/* mysqlnd_res::fetch_all works with buffered resultsets only */
if (result->unbuf || (!result->unbuf && !set)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "fetch_all can be
used only with buffered sets");
+ if (result->conn) {
+ SET_CLIENT_ERROR(result->conn->error_info,
CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "fetch_all can be used only with buffered
sets");
+ }
RETVAL_NULL();
DBG_VOID_RETURN;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php