Permalink
Browse files

Try to fix mysqli_field tests

Those tests seem to fail when people have a different default collation, so
try to fix by specifying utf8_general_ci explicitely.
  • Loading branch information...
nikic committed Aug 15, 2012
1 parent 8f05350 commit 018395efafeb8cbce0b8864ca4a1eac232db1cbb
Showing with 2 additions and 2 deletions.
  1. +2 −2 ext/mysqli/tests/table.inc
@@ -12,12 +12,12 @@ 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);
}
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));
}
-?>
+?>

0 comments on commit 018395e

Please sign in to comment.