summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/mysql/tests/bug55473.phpt7
-rwxr-xr-xext/mysql/tests/mysql_pconn_kill.phpt2
-rw-r--r--ext/mysqlnd/mysqlnd_charset.c4
3 files changed, 9 insertions, 4 deletions
diff --git a/ext/mysql/tests/bug55473.phpt b/ext/mysql/tests/bug55473.phpt
index d492e68349..3a145fd780 100644
--- a/ext/mysql/tests/bug55473.phpt
+++ b/ext/mysql/tests/bug55473.phpt
@@ -18,6 +18,11 @@ mysql.allow_persistent=1
$tmp = NULL;
$link = NULL;
+ if ($socket)
+ $host = sprintf("%s:%s", $host, $socket);
+ else if ($port)
+ $host = sprintf("%s:%s", $host, $port);
+
function connect($host, $user, $passwd) {
$conn = mysql_pconnect($host, $user, $passwd);
if (!$conn)
@@ -68,4 +73,4 @@ OK
Warning: mysql_ping(): MySQL server has gone away in %s on line %d
reconnect
OK
-done! \ No newline at end of file
+done!
diff --git a/ext/mysql/tests/mysql_pconn_kill.phpt b/ext/mysql/tests/mysql_pconn_kill.phpt
index 8543e39d6c..efef421604 100755
--- a/ext/mysql/tests/mysql_pconn_kill.phpt
+++ b/ext/mysql/tests/mysql_pconn_kill.phpt
@@ -64,7 +64,7 @@ mysql.max_persistent=2
mysql_close($plink);
- if (!($plink = mysql_pconnect($myhost, $user, $passwd)))
+ if (!($plink = @mysql_pconnect($myhost, $user, $passwd)))
printf("[009] Cannot create new persistent connection, [%d] %s\n", mysql_errno(), mysql_error());
mysql_select_db($db, $plink);
diff --git a/ext/mysqlnd/mysqlnd_charset.c b/ext/mysqlnd/mysqlnd_charset.c
index 6792229d10..a87b2a1f4f 100644
--- a/ext/mysqlnd/mysqlnd_charset.c
+++ b/ext/mysqlnd/mysqlnd_charset.c
@@ -126,8 +126,8 @@ static unsigned int check_mb_utf8_sequence(const char *start, const char *end)
if (!((start[1] ^ 0x80) < 0x40 &&
(start[2] ^ 0x80) < 0x40 &&
(start[3] ^ 0x80) < 0x40 &&
- (c >= 0xf1 || start[1] >= 0x90) &&
- (c <= 0xf3 || start[1] <= 0x8F)))
+ (c >= 0xf1 || start[1] >= (char)0x90) &&
+ (c <= 0xf3 || start[1] <= (char)0x8F)))
{
return 0; /* invalid utf8 character */
}