]> granicus.if.org Git - php/commitdiff
Fix version check in test
authorNikita Popov <nikic@php.net>
Sun, 24 Mar 2013 11:52:56 +0000 (12:52 +0100)
committerNikita Popov <nikic@php.net>
Sun, 24 Mar 2013 12:58:35 +0000 (13:58 +0100)
ext/mysql/tests/mysql_field_flags.phpt

index 7f1b366d5cb1b07361733081678df29f3f4627a9..5f8eb0995f6d39e785a498eaaa88ea7dd327107a 100644 (file)
@@ -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';
 }