]> granicus.if.org Git - php/commitdiff
MFH. Fixing mysqlnd version test to run some four previously skipped tests. There...
authorUlf Wendel <uw@php.net>
Mon, 6 Jul 2009 15:45:19 +0000 (15:45 +0000)
committerUlf Wendel <uw@php.net>
Mon, 6 Jul 2009 15:45:19 +0000 (15:45 +0000)
ext/mysqli/tests/connect.inc
ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt
ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt
ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt
ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt
ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt
ext/mysqli/tests/mysqli_debug_ini.phpt

index 9bb9836b725a61562c7c08103ba73729caeb91eb..f8cd71c2b7ba240c5420a042d039fe543336eb59 100644 (file)
        if (!$IS_MYSQLND) {
                $MYSQLND_VERSION = NULL;
        } else {
+               /*
+               The formatting of the version reported by mysqli_get_client_info()
+               has changed significantly in the past. To get tests working properly
+               with PHP 5.3.0 and up, we set everything that looks like prior to
+               PHP 5.3.0 to version 5.0.4 = 5 * 10000 + 0 * 100 + 4 = 50004.
+               PHP 5.3.0       reports mysqlnd 5.0.5 dev (= 5 * 10000 + 0 * 100 + 5 = 50005.
+               */
                if (preg_match('@Revision:\s+(\d+)\s*\$@ism', mysqli_get_client_info(), $matches)) {
-                       $MYSQLND_VERSION = (int)$matches[1];
+                       /* something prior to PHP 5.3.0 */
+                       $MYSQLND_VERSION = 50004;
+               } else if (preg_match('@^mysqlnd (\d+)\.(\d+)\.(\d+).*@ism', mysqli_get_client_info(), $matches)) {
+                       /* formatting schema used by PHP 5.3.0 */
+                       $MYSQLND_VERSION = (int)$matches[1] * 10000 + (int)$matches[2] * 100 + (int)$matches[3];
+               } else if (preg_match('@^mysqlnd/PHP 6.0.0-dev@ism', mysqli_get_client_info(), $matches)) {
+                       /*
+                               PHP 6.0 at the time of the first PHP 5.3.0 release.
+                               HEAD and 5.3 have been in sync when 5.3.0 was released.
+                               It is at least 5.0.5-dev.
+                       */
+                       $MYSQLND_VERSION = 50005;
                } else {
+                       /* unknown */
                        $MYSQLND_VERSION = -1;
                }
        }
index 8a59549e50873cb04abb40439cd02b6a9573a73e..9141469967e6c9e295dd2246a2f9485684c3acfb 100644 (file)
@@ -15,8 +15,8 @@ Those tests go into the details and are aimed to be a development tool, no more.
 */
 if (!$IS_MYSQLND)
        die("skip Test has been written for the latest version of mysqlnd only");
-if ($MYSQLND_VERSION < 576)
-       die("skip Test requires mysqlnd Revision 576 or newer");
+if ($MYSQLND_VERSION < 50005)
+       die("skip Test requires mysqlnd Revision 5.0.4 or newer");
 ?>
 --FILE--
 <?php
index 51dc05ed5a404347714730534097354cddb0de0e..802e524337b98bc10f36f12b35aa2af15217205a 100644 (file)
@@ -15,8 +15,8 @@ Those tests go into the details and are aimed to be a development tool, no more.
 */
 if (!$IS_MYSQLND)
        die("skip Test has been written for the latest version of mysqlnd only");
-if ($MYSQLND_VERSION < 576)
-       die("skip Test requires mysqlnd Revision 576 or newer");
+if ($MYSQLND_VERSION < 50004)
+       die("skip Test requires mysqlnd Revision 5.0.4 or newer");
 
 ?>
 --FILE--
@@ -423,6 +423,22 @@ Modifiers: 256
 Number of Parameters: 0
 Number of Required Parameters: 0
 
+Inspecting method 'poll'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: 256
+Number of Parameters: 0
+Number of Required Parameters: 0
+
 Inspecting method 'prepare'
 isFinal: no
 isAbstract: no
@@ -503,6 +519,38 @@ Modifiers: 256
 Number of Parameters: 0
 Number of Required Parameters: 0
 
+Inspecting method 'reap_async_query'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: 256
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'refresh'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: 256
+Number of Parameters: 0
+Number of Required Parameters: 0
+
 Inspecting method 'rollback'
 isFinal: no
 isAbstract: no
@@ -799,5 +847,4 @@ Default property 'server_version'
 Default property 'sqlstate'
 Default property 'thread_id'
 Default property 'warning_count'
-done!
-
+done!
\ No newline at end of file
index 5f26d1eb5d9dc238d37103f5c5995076c2cafcda..cf59732497714ef3186e1e9676a343a0f298f54a 100644 (file)
@@ -17,8 +17,8 @@ Those tests go into the details and are aimed to be a development tool, no more.
 */
 if (!$IS_MYSQLND)
        die("skip Test has been written for the latest version of mysqlnd only");
-if ($MYSQLND_VERSION < 576)
-       die("skip Test requires mysqlnd Revision 576 or newer");
+if ($MYSQLND_VERSION < 50004)
+       die("skip Test requires mysqlnd Revision 5.0.4 or newer");
 ?>
 --FILE--
 <?php
index 2b6343c436f278dc8620f521ab1a2a22a387992f..45cc38a704388cea7b147735eca0f6660165389c 100644 (file)
@@ -187,5 +187,5 @@ stmt->unknown = '13'
 
 Prepare using the constructor:
 
-Warning: mysqli_stmt::__construct() expects parameter 2 to be string, object given in %s on line %d
+Warning: mysqli_stmt::__construct() expects parameter 2 to be %binary_string_optional%, object given in %s on line %d
 done!
\ No newline at end of file
index cb690437ae39cf9703fe4d9c9c3a114cea6dfaba..dc0c14e6e881299e2d8e9710dfc906051405a13a 100644 (file)
@@ -16,8 +16,8 @@ Those tests go into the details and are aimed to be a development tool, no more.
 */
 if (!$IS_MYSQLND)
        die("skip Test has been written for the latest version of mysqlnd only");
-if ($MYSQLND_VERSION < 576)
-       die("skip Test requires mysqlnd Revision 576 or newer");
+if ($MYSQLND_VERSION < 50004)
+       die("skip Test requires mysqlnd Revision 5.0.4 or newer");
 ?>
 --FILE--
 <?php
index 7581385a9f43ff7268092a29a3bf10daa0bcfa82..859a44c32f25e040169e56607a093a6f26d990f8 100644 (file)
@@ -15,8 +15,8 @@ if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED)
        die("skip: debug functionality not enabled");
 
 require_once('connect.inc');
-if (!$IS_MYSQLND || ($MYSQLND_VERSION < 940))
-       die("skip needs mysqlnd version/revision 940+");
+if (!$IS_MYSQLND || ($MYSQLND_VERSION < 50004))
+       die("skip needs mysqlnd version/revision 5.0.4");
 
 if (!$fp = @fopen('/tmp/mysqli_debug_phpt.trace', 'w'))
        die("skip PHP cannot create a file in /tmp/mysqli_debug_phpt");