]> granicus.if.org Git - php/commitdiff
MFH: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:47 +0000 (13:09 +0000)
committerAndrey Hristov <andrey@php.net>
Fri, 29 May 2009 13:09:47 +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 5061814b9f66709110eda2a7412cfa3edf385329..66607a5f11d182281a100aacd3cb392d63c8e184 100644 (file)
@@ -1484,7 +1484,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 88aed11b7dcbce7e7c05cb1227837abfb528fd6c..574d9567379350a414a41af663472cc914a678f1 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))