com php-src: Make mysqli_stmt_next_result available u nder libmysql: ext/mysqli/mysqli.stub.php ext/mysql i/mysqli_api.c ext/mysqli/mysqli_arginfo.h
| From: | Nikita Popov | Date: | Fri, 18 Dec 2020 10:32:41 +0000 |
| Subject: | com php-src: Make mysqli_stmt_next_result available u nder libmysql: ext/mysqli/mysqli.stub.php ext/mysql i/mysqli_api.c ext/mysqli/mysqli_arginfo.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-114501@lists.php.net to get a copy of this message | ||
Commit: be93e5a12002057922f5504a752c2a249e27ec8d
Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 18 Dec 2020 11:27:10 +0100
Parents: b88a493aaa1bd6cecce3341ab25c6cc6a171c417
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=be93e5a12002057922f5504a752c2a249e27ec8d
Log:
Make mysqli_stmt_next_result available under libmysql
The libmysqlclient version we require supports mysql_stmt_next_result.
Changed paths:
M ext/mysqli/mysqli.stub.php
M ext/mysqli/mysqli_api.c
M ext/mysqli/mysqli_arginfo.h
Diff:
diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php
index c1059254fc1..e4da55cbb4d 100644
--- a/ext/mysqli/mysqli.stub.php
+++ b/ext/mysqli/mysqli.stub.php
@@ -457,13 +457,13 @@ class mysqli_stmt
* @alias mysqli_stmt_more_results
*/
public function more_results() {}
+#endif
/**
* @return bool
* @alias mysqli_stmt_next_result
*/
public function next_result() {}
-#endif
/**
* @return int|string
@@ -717,9 +717,9 @@ function mysqli_stmt_insert_id(mysqli_stmt $statement): int|string {}
#if defined(MYSQLI_USE_MYSQLND)
function mysqli_stmt_more_results(mysqli_stmt $statement): bool {}
+#endif
function mysqli_stmt_next_result(mysqli_stmt $statement): bool {}
-#endif
function mysqli_stmt_num_rows(mysqli_stmt $statement): int|string {}
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 0fc70179602...45c7dd196ff 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -1576,6 +1576,7 @@ PHP_FUNCTION(mysqli_stmt_more_results)
RETURN_BOOL(mysqlnd_stmt_more_results(stmt->stmt));
}
/* }}} */
+#endif
/* {{{ read next result from multi_query */
PHP_FUNCTION(mysqli_stmt_next_result) {
@@ -1594,7 +1595,6 @@ PHP_FUNCTION(mysqli_stmt_next_result) {
RETURN_TRUE;
}
/* }}} */
-#endif
/* {{{ Get number of fields in result */
PHP_FUNCTION(mysqli_num_fields)
diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h
index 509840a7fc5..c7d4cac03a3 100644
--- a/ext/mysqli/mysqli_arginfo.h
+++ b/ext/mysqli/mysqli_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 480939b71e1dacbdbb4634dbabf375943e399b6f */
+ * Stub hash: 6af7fe4ad33232a118fdde74d13e0fb8a04fb4b0 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1,
MAY_BE_LONG|MAY_BE_STRING)
ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0)
@@ -353,9 +353,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_stmt_more_results, 0, 1,
ZEND_END_ARG_INFO()
#endif
-#if defined(MYSQLI_USE_MYSQLND)
-#define arginfo_mysqli_stmt_next_result arginfo_mysqli_stmt_more_results
-#endif
+#define arginfo_mysqli_stmt_next_result arginfo_mysqli_stmt_execute
#define arginfo_mysqli_stmt_num_rows arginfo_mysqli_stmt_affected_rows
@@ -665,9 +663,7 @@ ZEND_END_ARG_INFO()
#define arginfo_class_mysqli_stmt_more_results arginfo_class_mysqli_get_connection_stats
#endif
-#if defined(MYSQLI_USE_MYSQLND)
-#define arginfo_class_mysqli_stmt_next_result arginfo_class_mysqli_get_connection_stats
-#endif
+#define arginfo_class_mysqli_stmt_next_result arginfo_class_mysqli_character_set_name
#define arginfo_class_mysqli_stmt_num_rows arginfo_class_mysqli_character_set_name
@@ -790,9 +786,7 @@ ZEND_FUNCTION(mysqli_stmt_insert_id);
#if defined(MYSQLI_USE_MYSQLND)
ZEND_FUNCTION(mysqli_stmt_more_results);
#endif
-#if defined(MYSQLI_USE_MYSQLND)
ZEND_FUNCTION(mysqli_stmt_next_result);
-#endif
ZEND_FUNCTION(mysqli_stmt_num_rows);
ZEND_FUNCTION(mysqli_stmt_param_count);
ZEND_FUNCTION(mysqli_stmt_prepare);
@@ -918,9 +912,7 @@ static const zend_function_entry ext_functions[] = {
#if defined(MYSQLI_USE_MYSQLND)
ZEND_FE(mysqli_stmt_more_results, arginfo_mysqli_stmt_more_results)
#endif
-#if defined(MYSQLI_USE_MYSQLND)
ZEND_FE(mysqli_stmt_next_result, arginfo_mysqli_stmt_next_result)
-#endif
ZEND_FE(mysqli_stmt_num_rows, arginfo_mysqli_stmt_num_rows)
ZEND_FE(mysqli_stmt_param_count, arginfo_mysqli_stmt_param_count)
ZEND_FE(mysqli_stmt_prepare, arginfo_mysqli_stmt_prepare)
@@ -1040,9 +1032,7 @@ static const zend_function_entry class_mysqli_stmt_methods[] = {
#if defined(MYSQLI_USE_MYSQLND)
ZEND_ME_MAPPING(more_results, mysqli_stmt_more_results, arginfo_class_mysqli_stmt_more_results,
ZEND_ACC_PUBLIC)
#endif
-#if defined(MYSQLI_USE_MYSQLND)
ZEND_ME_MAPPING(next_result, mysqli_stmt_next_result, arginfo_class_mysqli_stmt_next_result,
ZEND_ACC_PUBLIC)
-#endif
ZEND_ME_MAPPING(num_rows, mysqli_stmt_num_rows, arginfo_class_mysqli_stmt_num_rows,
ZEND_ACC_PUBLIC)
ZEND_ME_MAPPING(send_long_data, mysqli_stmt_send_long_data,
arginfo_class_mysqli_stmt_send_long_data, ZEND_ACC_PUBLIC)
ZEND_ME_MAPPING(free_result, mysqli_stmt_free_result, arginfo_class_mysqli_stmt_free_result,
ZEND_ACC_PUBLIC)