unbuffered sets (text protocol and PS).
. Fixed bug #53963 (Ensure error_code is always set during some failed
decodings). (Scott)
+- mysqlnd
+ . Fixed problem with always returning 0 as num_rows for unbuffered sets.
+ (Andrey, Ulf)
+
- MySQL Improved extension:
. Added 'db' and 'catalog' keys to the field fetching functions (FR #39847).
(Kalle)
$i++;
} while (mysqli_stmt_fetch($stmt));
- if (0 !== ($tmp = mysqli_stmt_num_rows($stmt)))
- printf("[54] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
+ if (7 !== ($tmp = mysqli_stmt_num_rows($stmt)))
+ printf("[54] Expecting int/7, got %s/%s\n", gettype($tmp), $tmp);
} else {
printf("[055] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
MYSQLND_METHOD(mysqlnd_res, num_rows)(const MYSQLND_RES * const result TSRMLS_DC)
{
/* Be compatible with libmysql. We count row_count, but will return 0 */
- return result->stored_data? result->stored_data->row_count:0;
+ return result->stored_data? result->stored_data->row_count:(result->unbuf && result->unbuf->eof_reached? result->unbuf->row_count:0);
}
/* }}} */