1
0
mirror of https://github.com/php/php-src.git synced 2026-04-04 22:52:40 +02:00

Merge branch 'PHP-7.0'

* PHP-7.0:
  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.
This commit is contained in:
Dmitry Stogov
2015-10-07 14:12:43 +03:00

View File

@@ -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';
}