mirror of
https://github.com/MariaDB/server.git
synced 2025-05-11 13:21:44 +03:00
The problem is that these tests run optimistic parallel replication with non-transactional mysql.gtid_slave_pos table. Very occasionally InnoDB stats update may race with one another and cause a parallel replication deadlock kill after the mysql.gtid_slave_pos table has been updated. Since mysql.gtid_slave_pos is non-transactional, the update cannot be rolled back, and transaction retry will fail with a duplicate key error in mysql.gtid_slave_pos. Fixed by altering the storage engine to InnoDB for the table. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
41 lines
1.1 KiB
Plaintext
41 lines
1.1 KiB
Plaintext
#
|
|
# Start Alter with binlog applied using mysqlbinlog
|
|
# single master with only one domain id
|
|
#
|
|
--source include/have_innodb.inc
|
|
--source include/have_debug.inc
|
|
--source include/master-slave.inc
|
|
|
|
--connection master
|
|
set global binlog_alter_two_phase=true;
|
|
--connection slave
|
|
--source include/stop_slave.inc
|
|
SET STATEMENT sql_log_bin=0 FOR
|
|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
|
set global gtid_strict_mode=1;
|
|
|
|
--echo # Legacy Master Slave
|
|
--let $domain_1=0
|
|
--let $domain_2=0
|
|
--let $M_port= $MASTER_MYPORT
|
|
--let $S_port= $SLAVE_MYPORT
|
|
--let $sync_slave=0
|
|
|
|
--source include/start_alter_include.inc
|
|
--connection master
|
|
--let $MYSQLD_DATADIR= `select @@datadir;`
|
|
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/master.sql
|
|
select @@gtid_binlog_state;
|
|
RESET master;
|
|
|
|
--connection slave
|
|
--exec $MYSQL --host=127.0.0.1 --port=$SLAVE_MYPORT -e "source $MYSQLTEST_VARDIR/tmp/master.sql"
|
|
select @@gtid_binlog_state;
|
|
set global gtid_strict_mode=0;
|
|
--source include/start_slave.inc
|
|
|
|
--connection master
|
|
set global binlog_alter_two_phase=false;
|
|
remove_file $MYSQLTEST_VARDIR/tmp/master.sql;
|
|
--source include/rpl_end.inc
|