diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
commit | a175314c3e5827eb193872241446f2f8f5c9d33c (patch) | |
tree | cd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/include/wait_until_disconnected.inc | |
parent | Initial commit. (diff) | |
download | mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.tar.xz mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.zip |
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/include/wait_until_disconnected.inc')
-rw-r--r-- | mysql-test/include/wait_until_disconnected.inc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/include/wait_until_disconnected.inc b/mysql-test/include/wait_until_disconnected.inc new file mode 100644 index 00000000..93ada7f1 --- /dev/null +++ b/mysql-test/include/wait_until_disconnected.inc @@ -0,0 +1,23 @@ +# Include this script after a shutdown to wait until the connection +# to the server has been lost or timeout occurs. +# When you change this file you may have to chance its cousin +# wait_until_connected_again.inc + +--disable_result_log +--disable_query_log +let $counter= 600; +let $mysql_errno= 0; +while (!$mysql_errno) +{ + --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013 + show status; + + dec $counter; + if (!$counter) + { + --die Server failed to disappear + } + --real_sleep 0.1 +} +--enable_query_log +--enable_result_log |