Commit:    aa2b54812fe0cc944d1d65f161dc58b04a23c26d
Author:    Nikita Popov <ni...@php.net>         Sun, 24 Mar 2013 12:52:56 +0100
Parents:   0179284bfb07b4e8ac08d37bf5b47f97a814b023
Branches:  PHP-5.5 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=aa2b54812fe0cc944d1d65f161dc58b04a23c26d

Log:
Fix version check in test

Changed paths:
  M  ext/mysql/tests/mysql_field_flags.phpt


Diff:
diff --git a/ext/mysql/tests/mysql_field_flags.phpt 
b/ext/mysql/tests/mysql_field_flags.phpt
index 7f1b366..5f8eb09 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';
 }


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Reply via email to