Re: Re: com php-src: Really fix test pdo_mysql_class_constants.phpt: ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt

From: Date: Mon, 04 Feb 2013 10:29:37 +0000
Subject: Re: Re: com php-src: Really fix test pdo_mysql_class_constants.phpt: ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-65624@lists.php.net to get a copy of this message
On Wed, Dec 12, 2012 at 5:17 PM, Remi Collet <remi@fedoraproject.org> wrote:

> 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
>
>
hi,

from a quick search, I would say that albeit there are a couple of
exceptions, like mysql, but the majority of the pdo exts only returns the
version number for PDO_ATTR_CLIENT_VERSION:
http://lxr.php.net/search?q=PDO_ATTR_CLIENT_VERSION&defs=&refs=&path=&hist=&project=PECL&project=PHP_5_5

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu


Thread (2 messages)

« previous php.internals (#65624) next »