MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:uwendel Date:June 20 2007 5:35pm
Subject:PHP mysqlnd svn commit: r414 - trunk/tests/ext/mysqli
View as plain text  
Author: uwendel
Date: 2007-06-20 19:35:03 +0200 (Wed, 20 Jun 2007)
New Revision: 414

Modified:
   trunk/tests/ext/mysqli/mysqli_stmt_bind_param.phpt
Log:
Code coverage ratio taught me about an undocumented syntax... Now it's falling because of
different error messages on mysqlnd and libmysql. On other occassions we suppress 
the error messages, I suggest to do the same for the one error message that's causing the
failure. Andrey, please decide. My recommendation is: add @ to suppress the 
error message... mysqlnd is more precise than libmysql, no reason to break with that.


Modified: trunk/tests/ext/mysqli/mysqli_stmt_bind_param.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_stmt_bind_param.phpt	2007-06-20 17:15:49 UTC (rev 413)
+++ trunk/tests/ext/mysqli/mysqli_stmt_bind_param.phpt	2007-06-20 17:35:03 UTC (rev 414)
@@ -36,7 +36,19 @@
         
     $id = null;
     $label = null;
-            
+    
+    if (!false === ($tmp = mysqli_stmt_bind_param($stmt, "", $id, $label)))
+        printf("[003a] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);      
 
+    
+    /* TODO: somehwhat undocumented syntax! */
+    $param = array($id);
+    if (!false === ($tmp = mysqli_stmt_bind_param($stmt, "is", $param)))
+        printf("[003b] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);      
 
+        
+    $param = array($id, $label, $id);
+    if (!false === ($tmp = mysqli_stmt_bind_param($stmt, "is", $param)))
+        printf("[003c] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+        
     if (!false === ($tmp = mysqli_stmt_bind_param($stmt, "a", $id)))
         printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
         
@@ -288,6 +300,12 @@
     print "done!";
 ?>
 --EXPECTF--
+Warning: mysqli_stmt_bind_param(): Number of elements in type definition string doesn't
match number of bind variables in %s on line %d
+
+Warning: mysqli_stmt_bind_param(): Number of elements in type definition string doesn't
match number of bind variables in %s on line %d
+
+Warning: mysqli_stmt_bind_param(): Number of elements in type definition string doesn't
match number of bind variables in %s on line %d
+
 Warning: mysqli_stmt_bind_param(): Number of variables doesn't match number of parameters
in prepared statement in %s on line %d
 
 Warning: mysqli_stmt_bind_param(): Number of elements in type definition string doesn't
match number of bind variables in %s on line %d
@@ -295,4 +313,4 @@
 Warning: mysqli_stmt_bind_param(): Undefined fieldtype a (parameter 3) in %s on line %d
 
 Warning: mysqli_stmt_bind_param(): Undefined fieldtype a (parameter 4) in %s on line %d
-done! 
+done!
\ No newline at end of file

Thread
PHP mysqlnd svn commit: r414 - trunk/tests/ext/mysqliuwendel20 Jun