List:Commits« Previous MessageNext Message »
From:uwendel Date:March 22 2007 1:59pm
Subject:PHP mysqlnd svn commit: r250 - trunk/ext/mysqli/tests
View as plain text  
Author: uwendel
Date: 2007-03-22 14:59:26 +0100 (Thu, 22 Mar 2007)
New Revision: 250

Modified:
   trunk/ext/mysqli/tests/mysqli_more_results.phpt
Log:
4.1 seems not to return anything meaningful to mysqli_more_results() before
mysqli_use_result() and/or mysqli_store_result() has been called. libmysql and mysqlnd
act 
consistently on this. Let's make the test pass for 4.1 and work around this issue in the
test code.


Modified: trunk/ext/mysqli/tests/mysqli_more_results.phpt
===================================================================
--- trunk/ext/mysqli/tests/mysqli_more_results.phpt	2007-03-22 12:26:21 UTC (rev 249)
+++ trunk/ext/mysqli/tests/mysqli_more_results.phpt	2007-03-22 13:59:26 UTC (rev 250)
@@ -26,9 +26,10 @@
     if (!mysqli_multi_query($link, "SELECT 1 AS a; SELECT 1 AS a, 2 AS b; SELECT id FROM
test ORDER BY id LIMIT 3"))
         printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link));            
     print "[006]\n";
-    $i = 0;
-    if (mysqli_more_results($link)) 
-            printf("%d\n", $i++);
+    $i = 1;
+    
+    if (mysqli_get_server_version($link) > 41000 && !($ret =
mysqli_more_results($link)))
+        printf("[006a] Expecting boolean/true, got %s/%s\n", gettype($ret), $ret);
     do {
         $res = mysqli_store_result($link);        
         mysqli_free_result($res);
@@ -39,9 +40,10 @@
     if (!mysqli_multi_query($link, "SELECT 1 AS a; SELECT 1 AS a, 2 AS b; SELECT id FROM
test ORDER BY id LIMIT 3"))
         printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
     print "[008]\n";
-    $i = 0;
-    if (mysqli_more_results($link)) 
-            printf("%d\n", $i++);
+    $i = 1;
+    if (mysqli_get_server_version($link) > 41000 && !($ret =
mysqli_more_results($link)))
+        printf("[008a] Expecting boolean/true, got %s/%s\n", gettype($ret), $ret);
+        
     do {
         $res = mysqli_use_result($link);  
         // NOTE: if you use mysqli_use_result() with mysqli_more_results() or any other
info function, 
@@ -65,13 +67,11 @@
 [004]
 bool(false)
 [006]
-0
 1
 2
 
 Strict Standards: mysqli_next_result(): There is no next result set. Please, call
mysqli_more_results()/mysqli::more_results() to check whether to call this
function/method in %s on line %d
 [008]
-0
 1
 2
 

Thread
PHP mysqlnd svn commit: r250 - trunk/ext/mysqli/testsuwendel22 Mar