]> granicus.if.org Git - php/commitdiff
Reduce case where this test will fails:
authorRemi Collet <remi@php.net>
Mon, 3 Dec 2012 14:32:52 +0000 (15:32 +0100)
committerRemi Collet <remi@php.net>
Mon, 3 Dec 2012 14:32:52 +0000 (15:32 +0100)
- no connection AND no mysqli extension

So, will succeed when no configured connection, but mysqli available.

ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt

index 2545307cfbc3c62fd00eae29889c75f52e30f6cf..e52e4b54e7cbac4ba79bb4c842c4bb62d509f3fd 100644 (file)
@@ -29,7 +29,8 @@ require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
                $expected['MYSQL_ATTR_READ_DEFAULT_GROUP']              = true;
        }
 
-       if (extension_loaded('mysqli') && stristr(mysqli_get_client_info(), "mysqlnd")
+       if (extension_loaded('mysqli')
+           && (stristr(mysqli_get_client_info(), "mysqlnd") || mysqli_get_client_version() > 50605)
                || MySQLPDOTest::getClientVersion(MySQLPDOTest::factory()) > 50605) {
                /* XXX the MySQL client library version isn't exposed with any 
                constants, the single possibility is to use the PDO::getAttribute().