summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2008-12-25 17:53:24 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2008-12-25 17:53:24 +0800
commit2070da70924400b1a4b40c1baeb073978c13a2f3 (patch)
tree0c37201b5d23c3a2227a91816b347889847e9cec /client/mysqltest.cc
parent2349c56f1cec668bb5f8bacd620ee5ca00acdbd5 (diff)
downloadmariadb-git-2070da70924400b1a4b40c1baeb073978c13a2f3.tar.gz
BUG#40704 main.events_restart fails sporadically in pushbuild: "server has gone away"
mysqltest command 'shutdown_server' is supposed to shutdown the server and wait for it to be gone, and kill it when timeout. But because the arguments passed to my_kill were in the wrong order, 'shutdown_server' does not wait nor kill the server at all. So after 'shutdown_server', the server is still running, and the server may still accepting connections. mysql-test/include/mtr_warnings.sql: Suppress forcing close thread messages when server shuts down mysql-test/include/restart_mysqld.inc: wait_until_disconnected.inc is not required after fix shutdown_server command
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 1b866085c41..52953ba4618 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -4177,9 +4177,9 @@ void do_shutdown_server(struct st_command *command)
/* Check that server dies */
while(timeout--){
- if (my_kill(0, pid) < 0){
+ if (my_kill(pid, 0) < 0){
DBUG_PRINT("info", ("Process %d does not exist anymore", pid));
- break;
+ DBUG_VOID_RETURN;
}
DBUG_PRINT("info", ("Sleeping, timeout: %d", timeout));
my_sleep(1000000L);
@@ -4187,7 +4187,7 @@ void do_shutdown_server(struct st_command *command)
/* Kill the server */
DBUG_PRINT("info", ("Killing server, pid: %d", pid));
- (void)my_kill(9, pid);
+ (void)my_kill(pid, 9);
DBUG_VOID_RETURN;