diff options
author | Teemu Ollakka <teemu.ollakka@galeracluster.com> | 2017-04-24 18:39:38 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2017-08-14 14:41:12 +0300 |
commit | dd72d66c452923fb171ab3fc36322589eae25e46 (patch) | |
tree | b27b2d7714d93f59e69e4e1be460184c791d39a1 /mysql-test | |
parent | 224ae5770f82a77274d2046477585ea5a6b8b960 (diff) | |
download | mariadb-git-dd72d66c452923fb171ab3fc36322589eae25e46.tar.gz |
MW-373 Wait for wsrep_ready at startup when provider is loaded
Conflicts:
mysql-test/include/kill_and_restart_mysqld.inc
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/include/restart_mysqld.inc | 3 | ||||
-rw-r--r-- | mysql-test/include/start_mysqld.inc | 3 | ||||
-rw-r--r-- | mysql-test/include/wait_wsrep_ready.inc | 15 |
3 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/include/restart_mysqld.inc b/mysql-test/include/restart_mysqld.inc index dcaf47c55a2..c817694e57a 100644 --- a/mysql-test/include/restart_mysqld.inc +++ b/mysql-test/include/restart_mysqld.inc @@ -50,6 +50,9 @@ if (!$restart_parameters) # Call script that will poll the server waiting for it to be back online again --source include/wait_until_connected_again.inc +# Wait for wsrep +--source include/wait_wsrep_ready.inc + # Turn off reconnect again --disable_reconnect diff --git a/mysql-test/include/start_mysqld.inc b/mysql-test/include/start_mysqld.inc index e31f26aad8c..04dff714d49 100644 --- a/mysql-test/include/start_mysqld.inc +++ b/mysql-test/include/start_mysqld.inc @@ -16,6 +16,9 @@ if (!$restart_parameters) # Call script that will poll the server waiting for it to be back online again --source include/wait_until_connected_again.inc +# Wait for wsrep +--source include/wait_wsrep_ready.inc + # Turn off reconnect again --disable_reconnect diff --git a/mysql-test/include/wait_wsrep_ready.inc b/mysql-test/include/wait_wsrep_ready.inc new file mode 100644 index 00000000000..0e666afa33d --- /dev/null +++ b/mysql-test/include/wait_wsrep_ready.inc @@ -0,0 +1,15 @@ +# +# If the wsrep plugin is loaded, wait until the wsrep provider becomes +# ready for use. +# + +--disable_query_log +--disable_result_log + +if (`SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`) +{ + --source include/galera_wait_ready.inc +} + +--enable_query_log +--enable_result_log |