Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
None
Description
A deadlock of two phase binlogged "start" ALTER with the following in binlog order DML statement on the parallel slave is caused
by partly missed integration of a MDEV-16329's feature with the MDEV-11675 framework. A stronger than required MDL lock
by ALTER prevents the DML execution on slave (while it succeed on master).
The following mtr test exposes it
source include/master-slave.inc;
|
|
--connection slave
|
source include/stop_slave.inc;
|
|
#
|
# MDEV-31755 Replica's DML event deadlocks wit online alter table |
#
|
# Three threads for SA,U,CA |
--let $slave_parallel_threads=`select @@global.slave_parallel_threads` |
--let $slave_parallel_mode= `select @@global.slave_parallel_mode` |
set global slave_parallel_threads=3; |
set global slave_parallel_mode= optimistic;
|
|
--connection master
|
create table t (id int, a int, b text, primary key (id)); |
insert into t values (1,10,''),(2,20,''); |
|
set @@session.binlog_alter_two_phase=1; |
set debug_sync= 'alter_table_online_progress signal ready wait_for go'; |
send alter table t force, algorithm=copy, lock=none;
|
|
connect (con1,localhost,root,,);
|
set debug_sync= 'now wait_for ready'; |
|
update t set a = 1; |
|
set debug_sync= 'now signal go'; |
|
--connection master
|
--reap
|
--source include/save_master_gtid.inc
|
|
--connection slave
|
source include/start_slave.inc;
|
--source include/sync_with_master_gtid.inc
|
Attachments
Issue Links
- is caused by
-
MDEV-16329 Engine-independent online ALTER TABLE
- Closed