mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
92fc426386
The patch also fixes a race in rpl_stop_slave.test. On machines with lots of CPU and memory, something like `mtr --parallel=10` can speed up the test suite enormously. However, we have a few test cases that run for long (several minutes), and if we are unlucky and happen to schedule those towards the end of the test suite, we end up with most workers idle while waiting for the last slow test to end, significantly delaying the finish of the entire suite. Improve this by marking the offending tests as taking "long", and trying to schedule those tests early. This reduces the time towards the end of the test suite run where some workers are waiting with nothing to do for the remaining workers each to finish their last test. Also, the rpl_stop_slave test had a race which could cause it to take a 300 seconds debug_sync timeout; this is fixed. Testing on a 4-core 8GB machine, this patch speeds up the test suite with around 30% for --parallel=10 (debug build), allowing to run the entire suite in 5 minutes.
40 lines
1,006 B
Text
40 lines
1,006 B
Text
--source include/have_debug.inc
|
|
--source include/long_test.inc
|
|
--source federated.inc
|
|
|
|
--echo #
|
|
--echo # Bug#47525: MySQL crashed (Federated)
|
|
--echo #
|
|
|
|
connection slave;
|
|
--echo # Switch to slave
|
|
CREATE TABLE t1(a INT);
|
|
INSERT INTO t1 VALUES (1);
|
|
|
|
connection master;
|
|
--echo # Switch to master
|
|
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
|
eval CREATE TABLE t1(a INT) ENGINE=FEDERATED
|
|
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1';
|
|
|
|
SELECT * FROM t1;
|
|
|
|
--echo # Start a asynchronous reload
|
|
--exec $MYSQLADMIN --no-defaults -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= refresh 2>&1
|
|
|
|
--echo # Wait for tables to be closed
|
|
let $show_statement= SHOW STATUS LIKE 'Open_tables';
|
|
let $field= Value;
|
|
let $condition= = '0';
|
|
--source include/wait_show_condition.inc
|
|
|
|
--echo # Ensure that the server didn't crash
|
|
SELECT * FROM t1;
|
|
--echo # Drop tables on master and slave
|
|
DROP TABLE t1;
|
|
connection slave;
|
|
DROP TABLE t1;
|
|
|
|
connection default;
|
|
--echo # Federated cleanup
|
|
source federated_cleanup.inc;
|