Commit:    018395efafeb8cbce0b8864ca4a1eac232db1cbb
Author:    Nikita Popov <ni...@php.net>         Wed, 15 Aug 2012 14:47:00 +0200
Parents:   8f05350061681793905d57e511081f4ee098f21a
Branches:  master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=018395efafeb8cbce0b8864ca4a1eac232db1cbb

Log:
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.

Changed paths:
  M  ext/mysqli/tests/table.inc


Diff:
diff --git a/ext/mysqli/tests/table.inc b/ext/mysqli/tests/table.inc
index aa1207a..2700c5a 100644
--- a/ext/mysqli/tests/table.inc
+++ b/ext/mysqli/tests/table.inc
@@ -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
+?>


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to