From 5d2813edceaf24664388ac301adc885e147606a3 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 7 Oct 2015 14:09:37 +0300 Subject: [PATCH] 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt index 06b936aeed2..e234a28fe5e 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'; }