]> granicus.if.org Git - php/commitdiff
Add support for mysql_stmt_store_result() from libmysql 6.0.8+ and 5.4.x
authorAndrey Hristov <andrey@php.net>
Fri, 29 May 2009 13:09:22 +0000 (13:09 +0000)
committerAndrey Hristov <andrey@php.net>
Fri, 29 May 2009 13:09:22 +0000 (13:09 +0000)
ext/mysqli/config.m4
ext/mysqli/mysqli_api.c
ext/mysqli/mysqli_mysqlnd.h
ext/mysqlnd/mysqlnd_libmysql_compat.h

index b0587cb1f89d0ff8703752979cf10529376c5b72..c69b16a81922a6386a841d8d8452ce8400e5f3e9 100644 (file)
@@ -61,6 +61,16 @@ elif test "$PHP_MYSQLI" != "no"; then
   ],[
     $MYSQLI_LIBLINE
   ])
+  dnl
+  dnl Check the library for mysql_stmt_store_result
+  dnl
+  PHP_CHECK_LIBRARY($MYSQL_LIB_NAME, mysql_stmt_next_result,
+  [
+    AC_DEFINE(HAVE_STMT_NEXT_RESULT,             1, [ ])
+  ],[
+  ],[
+    $MYSQLI_LIBLINE
+  ])
 fi
 
 dnl Build extension
index b81b148186b81c0317d7b239338ee51d80f3cb50..2bc4358ca7599f80d176b804c112ace089d63717 100644 (file)
@@ -1537,7 +1537,7 @@ PHP_FUNCTION(mysqli_next_result) {
 /* }}} */
 
 
-#ifdef MYSQLI_USE_MYSQLND
+#ifdef HAVE_STMT_NEXT_RESULT
 /* {{{ proto bool mysqli_stmt_next_result(object link)
    check if there any more query results from a multi query */
 PHP_FUNCTION(mysqli_stmt_more_results)
index 3d005765e8a589555cc6a164391fd184f3cc4c4d..6988b655b886f1aee77a08b32cb9e73d2c011f16 100644 (file)
@@ -40,4 +40,6 @@
 #define mysqli_bg_store_result(r)              mysqlnd_bg_store_result((r))
 #define mysqli_async_query(c, q, l)            mysqlnd_async_query((c), (q), (l))
 
+#define HAVE_STMT_NEXT_RESULT
+
 #endif
index b23d2fd1255af9fd88c26e4c4fea0e044c9105d1..a9e15c71ad1adcb25950bb46e30069527f934e5a 100644 (file)
 #define mysql_stmt_attr_set(s,a,v)             mysqlnd_stmt_attr_set((s), (a), (v))
 #define mysql_stmt_param_metadata(s)   mysqlnd_stmt_param_metadata((s))
 #define mysql_stmt_result_metadata(s)  mysqlnd_stmt_result_metadata((s))
+#define mysql_stmt_next_result(s)              mysqlnd_stmt_next_result((s))
+#define mysql_stmt_more_results(s)             mysqlnd_stmt_more_results((s))
 #define mysql_thread_safe()                            mysqlnd_thread_safe()
 #define mysql_info(r)                                  mysqlnd_info((r))
 #define mysql_options(r,a,b)                   mysqlnd_options((r), (a), (b))