summaryrefslogtreecommitdiff
path: root/ext/mysql
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2013-03-24 12:52:56 +0100
committerNikita Popov <nikic@php.net>2013-03-24 13:58:35 +0100
commitaa2b54812fe0cc944d1d65f161dc58b04a23c26d (patch)
tree7e5e392ccc4335cb73b10919c682ed18ae79a6f6 /ext/mysql
parent0179284bfb07b4e8ac08d37bf5b47f97a814b023 (diff)
downloadphp-git-aa2b54812fe0cc944d1d65f161dc58b04a23c26d.tar.gz
Fix version check in test
Diffstat (limited to 'ext/mysql')
-rw-r--r--ext/mysql/tests/mysql_field_flags.phpt6
1 files changed, 3 insertions, 3 deletions
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';
}