1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-27 05:41:41 +03:00
Files
mariadb/mysql-test/suite/galera/include/start_mysqld.inc
Daniele Sciascia 9e5671f1cc MDEV-15948 Fix error "Lost connection to MySQL server..." in test galera_sst_mysqldump
Test galera_sst_mysqldump often fails with error "2013: Lost connection
to MySQL server during query". The connection is lost after the test
restart one of the nodes. This happens because the server closes client
connections if it is joining a cluster through SST method mysqldump.
On unlucky runs of the test it is possible that mysqld is restarted,
and then mtr client is disconnected while it tries to determine if
galera is ready before going on with the test.
This patch rewrites galera_wait_ready.inc so that it is immune to
being disconnected.
2018-04-20 14:44:27 +02:00

16 lines
582 B
PHP

# Include this script only after using shutdown_mysqld.inc
# where $_expect_file_name was initialized.
# Write file to make mysql-test-run.pl start up the server again
if ($galera_wsrep_start_position != '') {
--echo Using --wsrep-start-position when starting mysqld ...
--exec echo "restart:$start_mysqld_params --wsrep-start-position=$galera_wsrep_start_position" > $_expect_file_name
--let $galera_wsrep_start_position = 0
}
if ($galera_wsrep_start_position == '') {
--exec echo "restart:$start_mysqld_params" > $_expect_file_name
}
--source include/galera_wait_ready.inc