Re: com php-src: Fixed test. MySQL and MariaDB of different versions have different assumptions about TIMESTAMP attributes. Probably we need to add
yet another condition to also check MariaDB version.: ext/mysqli/tests/mysqli_fetch_field_flags.phpt

From: Date: Wed, 07 Oct 2015 11:16:44 +0000
Subject: Re: com php-src: Fixed test. MySQL and MariaDB of different versions have different assumptions about TIMESTAMP attributes. Probably we need to add
yet another condition to also check MariaDB version.: ext/mysqli/tests/mysqli_fetch_field_flags.phpt
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89323@lists.php.net to get a copy of this message
Hi, Could you please verify the test fix. May be you know the MySQL<->MariaDB versions relation. Thanks. Dmitry. On Wed, Oct 7, 2015 at 2:09 PM, Dmitry Stogov <dmitry@php.net> wrote: > Commit: 5d2813edceaf24664388ac301adc885e147606a3 > Author: Dmitry Stogov <dmitry@zend.com> Wed, 7 Oct 2015 > 14:09:37 +0300 > Parents: 19e461b07d6b3f1f9f86ec7bcf7d0c5ca319cf77 > Branches: PHP-7.0 master > > Link: > > http://git.php.net/?p=php-src.git;a=commitdiff;h=5d2813edceaf24664388ac301adc885e147606a3 > > > Log: > Fixed test. > MySQL and MariaDB of different versions have different assumptions about > TIMESTAMP attributes. > Probably we need to add yet another condition to also check MariaDB > version. > > Changed paths: > M ext/mysqli/tests/mysqli_fetch_field_flags.phpt > > > Diff: > diff --git a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt > b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt > index 06b936a..e234a28 100644 > --- a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt > +++ b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt > @@ -106,7 +106,10 @@ mysqli_close($link); > if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, > $socket)) > printf("[001] [%d] %s\n", mysqli_connect_errno(), > mysqli_connect_error()); > > - if (mysqli_get_server_version($link) > 50600) { > + $is_maria_db = strpos(mysqli_get_server_info($link), "MariaDB") > !== false; > + if ($is_maria_db) { > + $columns['TIMESTAMP NOT NULL'] = 'ON_UPDATE_NOW TIMESTAMP > BINARY UNSIGNED NOT_NULL'; > + } else if (mysqli_get_server_version($link) > 50600) { > $columns['TIMESTAMP NOT NULL'] = 'ON_UPDATE_NOW TIMESTAMP > BINARY NOT_NULL'; > } > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.cvs (#89323) next »