mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Give an error when USE_RESULT is used with fetch_all
This commit is contained in:
parent
25710a406d
commit
12f8599b86
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user