Skip to content

Commit aa2b548

Browse files
committed
Fix version check in test
1 parent 0179284 commit aa2b548

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/mysql/tests/mysql_field_flags.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ mysql_free_result($res);
4545
$version = mysql_get_server_info($link);
4646
if (!preg_match('@(\d+)\.(\d+)\.(\d+)@ism', $version, $matches))
4747
printf("[009] Cannot get server version\n");
48-
$version = ($matches[1] * 100) + ($matches[2] * 10) + $matches[3];
48+
$version = ($matches[1] * 1000) + ($matches[2] * 100) + $matches[3];
4949

5050
$tables = array(
5151
'label INT, UNIQUE KEY (label)' => array(
5252
array('label', '1'),
53-
'label' => array(($version < 500) ? 'multiple_key' : 'unique_key')
53+
'label' => array(($version < 5000) ? 'multiple_key' : 'unique_key')
5454
),
5555
'labela INT, label2 CHAR(1), KEY keyname (labela, label2)' => array(
5656
array('labela, label2', "1, 'a'"),
@@ -86,7 +86,7 @@ $tables = array(
8686
),
8787
);
8888

89-
if ($version < 560) {
89+
if ($version < 5600) {
9090
$tables['label1 TIMESTAMP']['label1'][] = 'zerofill';
9191
$tables['label1 TIMESTAMP']['label1'][] = 'unsigned';
9292
}

0 commit comments

Comments
 (0)