From: Nikita Popov Date: Sun, 24 Mar 2013 11:52:56 +0000 (+0100) Subject: Fix version check in test X-Git-Tag: php-5.5.0beta2~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa2b54812fe0cc944d1d65f161dc58b04a23c26d;p=php Fix version check in test --- diff --git a/ext/mysql/tests/mysql_field_flags.phpt b/ext/mysql/tests/mysql_field_flags.phpt index 7f1b366d5c..5f8eb0995f 100644 --- a/ext/mysql/tests/mysql_field_flags.phpt +++ b/ext/mysql/tests/mysql_field_flags.phpt @@ -45,12 +45,12 @@ mysql_free_result($res); $version = mysql_get_server_info($link); if (!preg_match('@(\d+)\.(\d+)\.(\d+)@ism', $version, $matches)) printf("[009] Cannot get server version\n"); -$version = ($matches[1] * 100) + ($matches[2] * 10) + $matches[3]; +$version = ($matches[1] * 1000) + ($matches[2] * 100) + $matches[3]; $tables = array( 'label INT, UNIQUE KEY (label)' => array( array('label', '1'), - 'label' => array(($version < 500) ? 'multiple_key' : 'unique_key') + 'label' => array(($version < 5000) ? 'multiple_key' : 'unique_key') ), 'labela INT, label2 CHAR(1), KEY keyname (labela, label2)' => array( array('labela, label2', "1, 'a'"), @@ -86,7 +86,7 @@ $tables = array( ), ); -if ($version < 560) { +if ($version < 5600) { $tables['label1 TIMESTAMP']['label1'][] = 'zerofill'; $tables['label1 TIMESTAMP']['label1'][] = 'unsigned'; }