]> granicus.if.org Git - php/commitdiff
Not nice but neither the MySQL Client Library not mysqlnd are supposed to detect...
authorUlf Wendel <uw@php.net>
Mon, 21 Sep 2009 10:16:44 +0000 (10:16 +0000)
committerUlf Wendel <uw@php.net>
Mon, 21 Sep 2009 10:16:44 +0000 (10:16 +0000)
ext/mysqli/tests/mysqli_stmt_attr_set.phpt

index 810f19fdaaa2dd0cfd1aeb0303e0e2d098002161..1964fe82d0161de233457b817d1504f9cff6b265 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-mysqli_stmt_attr_set() - KNOWN ISSUE: mysqlnd does not check for invalid codes
+mysqli_stmt_attr_set() - mysqlnd does not check for invalid codes
 --SKIPIF--
 <?php
 require_once('skipif.inc');
@@ -58,8 +58,9 @@ require_once('skipifconnectfailure.inc');
                do {
                        $invalid_attr = mt_rand(-1 * PHP_INT_MAX + 1, PHP_INT_MAX);
                } while (in_array($invalid_attr, $valid_attr));
-               if (false !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0)))
-                       printf("[006b] Expecting boolean/false for attribute %d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp);
+               if (true !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0)))
+                       /* Although it may be desired to get false neither the MySQL Client Library nor mysqlnd are supposed to detect invalid codes */
+                       printf("[006b] Expecting boolean/true for attribute %d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp);
        }
        $stmt->close();