com php-src: Re-apply part fix of 4e2c016: ext/mysqli/tests/mys qli_change_user_oo.phpt ext/mysqli/tests/mysqli_rea l_escape_string_gbk.phpt
| From: | Xinchen Hui | Date: | Thu, 25 Dec 2014 05:43:39 +0000 |
| Subject: | com php-src: Re-apply part fix of 4e2c016: ext/mysqli/tests/mys qli_change_user_oo.phpt ext/mysqli/tests/mysqli_rea l_escape_string_gbk.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83862@lists.php.net to get a copy of this message | ||
Commit: 457c53182b9945d941ef50c658920768888d3f68
Author: Xinchen Hui <laruence@php.net> Thu, 25 Dec 2014 00:43:39 -0500
Parents: 99e2889a2c1a2eca6e6a0fb9ed9bb6abb8d073b9
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=457c53182b9945d941ef50c658920768888d3f68
Log:
Re-apply part fix of 4e2c016
Changed paths:
M ext/mysqli/tests/mysqli_change_user_oo.phpt
M ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt
Diff:
diff --git a/ext/mysqli/tests/mysqli_change_user_oo.phpt
b/ext/mysqli/tests/mysqli_change_user_oo.phpt
index 81712ea..34a3e51 100644
--- a/ext/mysqli/tests/mysqli_change_user_oo.phpt
+++ b/ext/mysqli/tests/mysqli_change_user_oo.phpt
@@ -46,6 +46,11 @@ if (mysqli_get_server_version($link) >= 50600)
if (false !== ($tmp = $mysqli->change_user($user, $passwd, $db . '_unknown_really')))
printf("[008] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
+ // Reconnect because after 3 failed change_user attempts, the server blocks you off.
+ if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
+ printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s,
port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket);
+
if (!$mysqli->query('SET @mysqli_change_user_test_var=1'))
printf("[009] Failed to set test variable: [%d] %s\n", $mysqli->errno,
$mysqli->error);
diff --git a/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt
b/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt
index ee84c86..53424e6 100644
--- a/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt
+++ b/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt
@@ -36,7 +36,7 @@ $port, $socket, mysqli_connect_errno(), mysqli_connect_error());
mysqli_error($link));
}
- if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1), PRIMARY
+ if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(3), PRIMARY
KEY(id)) ENGINE=' . $engine . " DEFAULT CHARSET=gbk")) {
printf("Failed to create test table: [%d] %s\n", mysqli_errno($link),
mysqli_error($link));