Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Give an error when USE_RESULT is used with fetch_all

  • Loading branch information...
commit 12f8599b865e57a12f1a161e2b7e8bbfec0fc1a9 1 parent 25710a4
authored

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. 4  ext/mysqlnd/mysqlnd_result.c
4  ext/mysqlnd/mysqlnd_result.c
@@ -1569,6 +1569,10 @@ MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES * result, unsigned int flags,
1569 1569
 
1570 1570
 	/* mysqlnd_res::fetch_all works with buffered resultsets only */
1571 1571
 	if (result->unbuf || (!result->unbuf && !set)) {
  1572
+		php_error_docref(NULL TSRMLS_CC, E_WARNING, "fetch_all can be used only with buffered sets");
  1573
+		if (result->conn) {
  1574
+			SET_CLIENT_ERROR(result->conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "fetch_all can be used only with buffered sets");
  1575
+		}
1572 1576
 		RETVAL_NULL();
1573 1577
 		DBG_VOID_RETURN;
1574 1578
 	}

0 notes on commit 12f8599

Please sign in to comment.
Something went wrong with that request. Please try again.