Re: com php-src: Really fix test pdo_mysql_class_constants.phpt: ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
| From: | Remi Collet | Date: | Wed, 12 Dec 2012 16:17:19 +0000 |
| Subject: | Re: com php-src: Really fix test pdo_mysql_class_constants.phpt: ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64269@lists.php.net to get a copy of this message | ||
Working on fixing pdo_mysql_class_constants.phpt, I notice a strange
behavior, which breaks MySQLPDOTest::getClientVersion()
*** With libmysqlclient
var_dump(mysqli_get_client_info());
=> string(6) "5.5.28"
var_dump(mysqli_get_client_version());
=> int(50528)
var_dump($pdo->getAttribute(PDO::ATTR_CLIENT_VERSION));
=> string(6) "5.5.28"
*** With mysqlnd
var_dump(mysqli_get_client_info());
string(75) "mysqlnd 5.0.10 - 20111026 - $Id:
b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $"
var_dump(mysqli_get_client_version());
int(50010)
var_dump($pdo->getAttribute(PDO::ATTR_CLIENT_VERSION));
=> string(75) "mysqlnd 5.0.10 - 20111026 - $Id:
b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $"
So PDO::ATTR_CLIENT_VERSION returns the client "info" (not the version)
Shouldn't we make things consistent ?
Perhaps also add a new PDO::ATTR_CLIENT_INFO ?
Remi.
Le 12/12/2012 16:53, Remi Collet a écrit :
> Branches: PHP-5.5 master
>
> Link:
> http://git.php.net/?p=php-src.git;a=commitdiff;h=6e4cfa18f768c385e1945fcb4776cf6ad0cecdfc
>
> Log:
> Really fix test pdo_mysql_class_constants.phpt