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 12:34:43 +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 2 3  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89325@lists.php.net to get a copy of this message
On Wed, Oct 7, 2015 at 2:41 PM, Andrey Hristov <andrey.hristov@oracle.com> wrote: > Hi, > I thought that MariaDB is a drop-in compatible with MySQL :) > At least they have different versions number. :( Could you please also take a look, if some of MySQL related tests may be fixed before 7.0 release. EXPECTED FAILED: int mysqli_poll() and kill [ext/mysqli/tests/mysqli_poll_kill.phpt] XFAIL REASON: To be fixed later. Minor issue about fetching error message from killed line mysqli_stmt_execute() - SP, next result [ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt] XFAIL REASON: Unsupported and undefined, under development mysqli_stmt_execute() - OUT [ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt] XFAIL REASON: Unsupported and undefined, under development Bug #39858 (Lost connection to MySQL server during query by a repeated call stored proced) [ext/pdo_mysql/tests/bug_39858.phpt] XFAIL REASON: nextRowset() problem with stored proc & emulation mode & mysqlnd PDO MySQL Bug #41997 (stored procedure call returning single rowset blocks future queries) [ext/pdo_mysql/tests/bug_41997.phpt] XFAIL REASON: nextRowset() problem with stored proc & emulation mode & mysqlnd PECL Bug #7976 (Calling stored procedure several times) [ext/pdo_mysql/tests/bug_pecl_7976.phpt] XFAIL REASON: Works with mysqlnd. It is not supported by libmysql. For libmysql is good enough to see no crash. MySQL PDOStatement->nextRowSet() [ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt] XFAIL REASON: nextRowset() problem with stored proc & emulation mode & mysqlnd MySQL Prepared Statements and different column counts [ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt] XFAIL REASON: nextRowset() problem with stored proc & emulation mode & mysqlnd FAILED: Bug #5547 (mysql_pconnect leaks file descriptors on reconnect) [/home/dmitry/php/mysql/tests/bug55473.phpt] Persistent connections and mysqli.max_links [ext/mysqli/tests/mysqli_pconn_max_links.phpt] mysqli_report() [ext/mysqli/tests/mysqli_report.phpt] WARNED: MySQL PDO->prepare(), emulated PS [ext/pdo_mysql/tests/pdo_mysql_prepare_emulated.phpt] (warn: XFAIL section but test passes) The last one seems to work with with valgrind. Thanks. Dmitry. > > Best, > Andrey > > On 7.10.2015 13:16, Dmitry Stogov wrote: > >> 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 >> <mailto:dmitry@php.net>> wrote: >> >> Commit: 5d2813edceaf24664388ac301adc885e147606a3 >> Author: Dmitry Stogov <dmitry@zend.com >> <mailto: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 (#89325) next »