]> granicus.if.org Git - php/commitdiff
'Fixing' test to reflect a libmysql vs. mysqlnd difference. With libmysql it is not...
authorUlf Wendel <uw@php.net>
Fri, 29 May 2009 11:59:09 +0000 (11:59 +0000)
committerUlf Wendel <uw@php.net>
Fri, 29 May 2009 11:59:09 +0000 (11:59 +0000)
ext/mysqli/tests/mysqli_stmt_affected_rows.phpt

index 4e69428e3e88c6178a0d921ac8fd9ef39ae0e902..7059608ccf1e8acedf57317046f9b8b52d490a86 100644 (file)
@@ -211,8 +211,13 @@ require_once('skipifconnectfailure.inc');
        if (-1 !== ($tmp = mysqli_stmt_affected_rows($stmt)))
                printf("[042] Expecting int/-1, got %s/%s\n", gettype($tmp), $tmp);
 
-       if (false !== ($tmp = mysqli_stmt_store_result($stmt)))
-               printf("[043] Expecting boolean/false, got %s\%s\n", gettype($tmp), $tmp);
+       if ($IS_MYSQLND) {
+               if (false !== ($tmp = mysqli_stmt_store_result($stmt)))
+                       printf("[043] Expecting boolean/false, got %s\%s\n", gettype($tmp), $tmp);
+       } else {
+               if (true !== ($tmp = mysqli_stmt_store_result($stmt)))
+                       printf("[043] Libmysql does not care if the previous statement was bogus, expecting boolean/true, got %s\%s\n", gettype($tmp), $tmp);
+       }
 
        if (0 !== ($tmp = mysqli_stmt_num_rows($stmt)))
                printf("[044] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);