From: Andrey Hristov Date: Tue, 13 Jul 2010 13:02:00 +0000 (+0000) Subject: Give an error when USE_RESULT is used with fetch_all X-Git-Tag: php-5.3.3RC3~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6dc3a5cbc750c51e9fdf5d3677f100c6473b18c;p=php Give an error when USE_RESULT is used with fetch_all --- diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index b9a05da05b..4de2f39ee3 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -1569,6 +1569,10 @@ MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES * result, unsigned int flags, /* 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; }