]> granicus.if.org Git - php/commitdiff
Try to fix mysqli_field tests
authorNikita Popov <nikic@php.net>
Wed, 15 Aug 2012 12:47:00 +0000 (14:47 +0200)
committerNikita Popov <nikic@php.net>
Wed, 15 Aug 2012 12:50:24 +0000 (14:50 +0200)
Those tests seem to fail when people have a different default collation, so
try to fix by specifying utf8_general_ci explicitely.

ext/mysqli/tests/table.inc

index aa1207af444bbfc0ac1d2212cafb9607eff1476a..2700c5a5e24193b6147dda6a6da1e07faaa1b89a 100644 (file)
@@ -12,7 +12,7 @@ if (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) {
        exit(1);
 }
 
-if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1), PRIMARY KEY(id)) ENGINE=' . $engine)) {
+if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1) COLLATE utf8_general_ci, PRIMARY KEY(id)) ENGINE=' . $engine)) {
        printf("Failed to create test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
        exit(1);
 }
@@ -20,4 +20,4 @@ if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1), PRIMARY KEY(i
 if (!mysqli_query($link, "INSERT INTO test(id, label) VALUES (1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e'), (6, 'f')")) {
        printf("[%d] %s\n",  mysqli_errno($link), mysqli_error($link));
 }
-?>
\ No newline at end of file
+?>