com php-src: Fixed ext/pdo_mysql/tests/pdo_mysql_class_ constants.phpt: ext/pdo_mysql/tests/pdo_mysql_class _constants.phpt
| From: | Anatoliy Belsky | Date: | Wed, 14 Nov 2012 20:18:16 +0000 |
| Subject: | com php-src: Fixed ext/pdo_mysql/tests/pdo_mysql_class_ constants.phpt: ext/pdo_mysql/tests/pdo_mysql_class _constants.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70547@lists.php.net to get a copy of this message | ||
Commit: f85ae48f4f06af3cf20e96e51cf7a86afcd3670f
Author: Anatoliy Belsky <ab@php.net> Wed, 14 Nov 2012 21:18:16 +0100
Parents: 01f189419429bb84b298dd9630fa9a63b67fe041
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f85ae48f4f06af3cf20e96e51cf7a86afcd3670f
Log:
Fixed ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
There is a constant now which only is there when mysqli with
mysqlnd and pdo_mysql was compiled at the same time, or when
libmysql version > 50605. So checking for that dynamically,
will fail only if there is no mysqli and no connection.
Changed paths:
M ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
Diff:
diff --git a/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
b/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
index 17fa5d6..2545307 100644
--- a/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
@@ -29,6 +29,14 @@ 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")
+ || 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().
+ This however will fail with no connection. */
+ $expected['MYSQL_ATTR_SERVER_PUBLIC_KEY'] = true;
+ }
+
/*
TODO