List:Commits« Previous MessageNext Message »
From:uwendel Date:August 13 2007 11:37am
Subject:PHP mysqlnd svn commit: r880 - trunk/tests/ext/mysqli
View as plain text  
Author: uwendel
Date: 2007-08-13 13:37:26 +0200 (Mon, 13 Aug 2007)
New Revision: 880

Modified:
   trunk/tests/ext/mysqli/mysqli_pconn_kill.phpt
Log:
Simple explanation for sometimes odd results: server needs
think-time to kill the thread...


Modified: trunk/tests/ext/mysqli/mysqli_pconn_kill.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_pconn_kill.phpt	2007-08-13 11:36:20 UTC (rev 879)
+++ trunk/tests/ext/mysqli/mysqli_pconn_kill.phpt	2007-08-13 11:37:26 UTC (rev 880)
@@ -47,14 +47,16 @@
 	if (!mysqli_query($link, sprintf('KILL %d', $pthread_id)))
 		printf("[006] Cannot kill persistent connection, [%d] %s\n", mysqli_errno($link),
mysqli_error($link));
 	mysqli_close($plink);
+	// Give the server think-time to kill the pthread
+	sleep(1);
 
-	if (!$res2 = mysqli_query($link, 'SHOW FULL PROCESSLIST'))
+	if (!$res = mysqli_query($link, 'SHOW FULL PROCESSLIST'))
 		printf("[007] Cannot get processlist, [%d] %s\n", mysqli_errno($link),
mysqli_error($link));
 
 	$running_threads2 = array();
-	while ($row = mysqli_fetch_assoc($res2))
+	while ($row = mysqli_fetch_assoc($res))
 		$running_threads2[$row['Id']] = $row;
-	mysqli_free_result($res2);
+	mysqli_free_result($res);
 
 	if (isset($running_threads2[$pthread_id]))
 		printf("[008] Thread of the persistent connection should have been gone, [%d] %s\n",
mysqli_errno($link), mysqli_error($link));

Thread
PHP mysqlnd svn commit: r880 - trunk/tests/ext/mysqliuwendel13 Aug