Skip to content

Commit 018395e

Browse files
committed
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.
1 parent 8f05350 commit 018395e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/mysqli/tests/table.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ if (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) {
1212
exit(1);
1313
}
1414

15-
if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1), PRIMARY KEY(id)) ENGINE=' . $engine)) {
15+
if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1) COLLATE utf8_general_ci, PRIMARY KEY(id)) ENGINE=' . $engine)) {
1616
printf("Failed to create test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
1717
exit(1);
1818
}
1919

2020
if (!mysqli_query($link, "INSERT INTO test(id, label) VALUES (1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e'), (6, 'f')")) {
2121
printf("[%d] %s\n", mysqli_errno($link), mysqli_error($link));
2222
}
23-
?>
23+
?>

0 commit comments

Comments
 (0)