summaryrefslogtreecommitdiff
path: root/ext/mysql/tests/mysql_pconn_kill.phpt
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2010-01-07 13:31:53 +0100
committerOndřej Surý <ondrej@sury.org>2010-01-07 13:31:53 +0100
commit0fab6db7cac8d2be99579dd049f812a8ff98e74f (patch)
tree91f01b0d06916c78262404096bfd466b8e95e5b5 /ext/mysql/tests/mysql_pconn_kill.phpt
parentd3a8757891280dc6650ca7eead67830c794b0e7b (diff)
downloadphp-0fab6db7cac8d2be99579dd049f812a8ff98e74f.tar.gz
Imported Upstream version 5.3.1upstream/5.3.1
Diffstat (limited to 'ext/mysql/tests/mysql_pconn_kill.phpt')
-rwxr-xr-xext/mysql/tests/mysql_pconn_kill.phpt16
1 files changed, 10 insertions, 6 deletions
diff --git a/ext/mysql/tests/mysql_pconn_kill.phpt b/ext/mysql/tests/mysql_pconn_kill.phpt
index df863bb79..8543e39d6 100755
--- a/ext/mysql/tests/mysql_pconn_kill.phpt
+++ b/ext/mysql/tests/mysql_pconn_kill.phpt
@@ -1,7 +1,7 @@
--TEST--
mysql_pconnect() - killing persitent connection
--SKIPIF--
-<?php
+<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
@@ -24,7 +24,7 @@ mysql.max_persistent=2
printf("[001] Cannot connect to the server using host=%s/%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $myhost, $user, $db, $port, $socket);
mysql_select_db($db, $plink);
-
+
$pthread_id = mysql_thread_id($plink);
$thread_id = mysql_thread_id($link);
@@ -40,8 +40,8 @@ mysql.max_persistent=2
printf("[003] Cannot find regular connection thread in process list, [%d] %s\n", mysql_errno($link), mysql_error($link));
if (!isset($processlist[$pthread_id]))
printf("[004] Cannot find persistent connection thread in process list, [%d] %s\n", mysql_errno($link), mysql_error($link));
-
- if (!mysql_query(sprintf("KILL %d", $pthread_id), $link))
+
+ if (!mysql_query(sprintf("KILL %d", $pthread_id), $link))
printf("[005] Cannot kill persistent connection thread, [%d] %s\n", mysql_errno($link), mysql_error($link));
while (1) {
@@ -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);
@@ -82,7 +82,7 @@ mysql.max_persistent=2
printf("[012] Cannot connect to the server using host=%s/%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $myhost, $user, $db, $port, $socket);
mysql_select_db($db, $link2);
- if (!mysql_query(sprintf("KILL %d", $thread_id), $link2))
+ if (!mysql_query(sprintf("KILL %d", $thread_id), $link2))
printf("[013] Cannot kill regular connection thread, [%d] %s\n", mysql_errno($link2), mysql_error($link2));
if (!($link = mysql_connect($myhost, $user, $passwd, true)))
@@ -101,6 +101,10 @@ mysql.max_persistent=2
mysql_close($link2);
print "done!";
?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
--EXPECTF--
bool(true)
done!