- MySQLi:
. Fixed bug #67983 (mysqlnd with MYSQLI_OPT_INT_AND_FLOAT_NATIVE fails to
interpret bit columns). (Nikita)
+ . Fixed bug #64638 (Fetching resultsets from stored procedure with cursor
+ fails). (Nikita)
+ . Fixed bug #72862 (segfault using prepared statements on stored procedures
+ that use a cursor). (Nikita)
+ . Fixed bug #77935 (Crash in mysqlnd_fetch_stmt_row_cursor when calling an SP
+ with a cursor). (Nikita)
-07 Jan 2021, PHP 7.4.14
+- PDO_Firebird:
+ . Fixed bug #80521 (Parameters with underscores no longer recognized). (cmb,
+ Simonov Denis)
+
+07 Jan 2021, PHP 8.0.1
- Core:
- . Fixed bug #74558 (Can't rebind closure returned by Closure::fromCallable()).
- (cmb)
. Fixed bug #80345 (PHPIZE configuration has outdated PHP_RELEASE_VERSION).
(cmb)
. Fixed bug #72964 (White space not unfolded for CC/Bcc headers). (cmb)
require_once("clean_table.inc");
?>
--EXPECTF--
-Warning: mysqli_stmt_fetch(): invalid object or resource mysqli_stmt
- in %s on line %d
-
-Warning: mysqli_stmt_fetch(): invalid object or resource mysqli_stmt
- in %s on line %d
-
-Warning: mysqli_stmt_get_result(): invalid object or resource mysqli_stmt
- in %s on line %d
+mysqli_stmt object is not fully initialized
+mysqli_stmt object is not fully initialized
+mysqli_stmt object is not fully initialized
- mysqli_stmt_get_result() cannot be used with cursors
- get_result() cannot be used with cursors
+ array(2) {
+ ["id"]=>
+ int(1)
+ ["label"]=>
+ string(1) "a"
+ }
+ array(2) {
+ ["id"]=>
+ int(2)
+ ["label"]=>
+ string(1) "b"
+ }
[040] [2014] [Commands out of sync; you can't run this command now]
[041] [0] []
array(2) {
enum_func_status mysqlnd_stmt_execute_batch_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer);
static void mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const stmt);
-static void mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const stmt, const unsigned int param_no);
+ static enum_func_status mysqlnd_stmt_send_cursor_fetch_command(
+ const MYSQLND_STMT_DATA *stmt, unsigned max_rows)
+ {
+ MYSQLND_CONN_DATA *conn = stmt->conn;
+ zend_uchar buf[MYSQLND_STMT_ID_LENGTH /* statement id */ + 4 /* number of rows to fetch */];
+ const MYSQLND_CSTRING payload = {(const char*) buf, sizeof(buf)};
+
+ int4store(buf, stmt->stmt_id);
+ int4store(buf + MYSQLND_STMT_ID_LENGTH, max_rows);
+
+ if (conn->command->stmt_fetch(conn, payload) == FAIL) {
+ COPY_CLIENT_ERROR(stmt->error_info, *conn->error_info);
+ return FAIL;
+ }
+ return PASS;
+ }
+
+ static zend_bool mysqlnd_stmt_check_state(const MYSQLND_STMT_DATA *stmt)
+ {
+ const MYSQLND_CONN_DATA *conn = stmt->conn;
+ if (stmt->state != MYSQLND_STMT_WAITING_USE_OR_STORE) {
+ return 0;
+ }
+ if (stmt->cursor_exists) {
+ return GET_CONNECTION_STATE(&conn->state) == CONN_READY;
+ } else {
+ return GET_CONNECTION_STATE(&conn->state) == CONN_FETCHING_DATA;
+ }
+ }
+
/* {{{ mysqlnd_stmt::store_result */
static MYSQLND_RES *
MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s)