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


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to