Author: uwendel
Date: 2007-06-21 14:16:47 +0200 (Thu, 21 Jun 2007)
New Revision: 424
Modified:
trunk/tests/ext/mysqli/065.phpt
Log:
Not sure why it fails on rhel-ia64, most likely because of the SET sql_mode=''. Adding
more debug information to it like it's always available with the newer tests.
Modified: trunk/tests/ext/mysqli/065.phpt
===================================================================
--- trunk/tests/ext/mysqli/065.phpt 2007-06-21 10:58:45 UTC (rev 423)
+++ trunk/tests/ext/mysqli/065.phpt 2007-06-21 12:16:47 UTC (rev 424)
@@ -14,31 +14,38 @@
<?php
include "connect.inc";
- $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
- mysqli_query($mysql, "SET sql_mode=''");
+ if (!$mysql = new mysqli($host, $user, $passwd, $db, $port, $socket))
+ printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+
+ if (!mysqli_query($mysql, "SET sql_mode=''"))
+ printf("[002] Cannot set SQL-Mode, [%d] %s\n", mysqli_errno($mysql),
mysqli_error($mysql));
$esc_str = chr(0xbf) . chr(0x5c);
+ $len = $charset = array();
+ $tmp = null;
if ($mysql->set_charset("latin1")) {
/* 5C should be escaped */
- $len[0] = strlen($mysql->real_escape_string($esc_str));
- $charset[0] = $mysql->client_encoding();
+ if (3 !== ($tmp = strlen($mysql->real_escape_string($esc_str))))
+ printf("[003] Expecting 3/int got %s/%s\n", gettype($tmp), $tmp);
+
+ if ('latin1' !== ($tmp = $mysql->client_encoding()))
+ printf("[004] Expecting latin1/string got %s/%s\n", gettype($tmp), $tmp);
}
if ($mysql->set_charset("gbk")) {
/* nothing should be escaped, it's a valid gbk character */
- $len[1] = strlen($mysql->real_escape_string($esc_str));
- $charset[1] = $mysql->client_encoding();
+
+ if (2 !== ($tmp = strlen($mysql->real_escape_string($esc_str))))
+ printf("[005] Expecting 2/int got %s/%s\n", gettype($tmp), $tmp);
+
+ if ('gbk' !== ($tmp = $mysql->client_encoding()))
+ printf("[005] Expecting gbk/string got %s/%s\n", gettype($tmp), $tmp);;
}
$mysql->close();
- var_dump($len[0]);
- var_dump($len[1]);
- var_dump($charset[0]);
- var_dump($charset[1]);
+
+ print "done!";
?>
--EXPECT--
-int(3)
-int(2)
-string(6) "latin1"
-string(3) "gbk"
+done!
\ No newline at end of file
| Thread |
|---|
| • PHP mysqlnd svn commit: r424 - trunk/tests/ext/mysqli | uwendel | 21 Jun |