1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
include/master-slave.inc
[connection master]
connection master;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format");
connection slave;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format");
# MDEV-31804 Assertion `thd->m_transaction_psi == __null' fails upon
# replicating online ALTER
connection master;
create table t (a char(8)) engine=myisam;
insert into t values ('foo'),('bar');
set debug_sync= 'alter_table_online_progress signal go_dml wait_for go_alter';
set @old_slave_exec_mode= @@global.slave_exec_mode;
set @@global.slave_exec_mode= idempotent;
alter table t force;
connection master1;
set debug_sync= 'now wait_for go_dml';
insert into t (a) values ('qux');
set debug_sync= 'now signal go_alter';
connection master;
connection slave;
connection master;
drop table t;
set global slave_exec_mode= @old_slave_exec_mode;
set debug_sync= reset;
#
# End of 11.2 tests (Single-phase alter)
#
connection slave;
include/stop_slave.inc
set global slave_parallel_threads=3;
set global slave_parallel_mode= optimistic;
set global binlog_row_image=MINIMAL;
connection master;
#
# MDEV-31755 Replica's DML event deadlocks wit online alter table
#
# Three threads for SA,U,CA
create table t (id int, a int, primary key (id)) engine=innodb;
insert into t values (1,10), (2,20);
set @@session.binlog_alter_two_phase=1;
set debug_sync= 'alter_table_online_downgraded signal ready wait_for go';
alter table t add c text default('qqq') after id, algorithm=copy, lock=none;
connection master1;
set debug_sync= 'now wait_for ready';
update t set a = 1;
set debug_sync= 'now signal go';
connection master;
include/save_master_gtid.inc
connection slave;
include/start_slave.inc
include/sync_with_master_gtid.inc
select * from t;
id c a
1 qqq 1
2 qqq 1
connection master;
drop table t;
# MDEV-31838 Assertion fails on replica upon parallel
# replication with two-phase alter and MINIMAL row image
create table t (id int, a int, primary key(id)) engine=aria;
insert into t values (1,0);
set @@session.binlog_alter_two_phase=1;
set debug_sync= 'alter_table_online_progress signal go_dml wait_for go_alter';
alter table t force, algorithm=copy, lock=none;
connection master1;
set binlog_row_image=MINIMAL;
set debug_sync= 'now wait_for go_dml';
update ignore t set a = 1;
set debug_sync= 'now signal go_alter';
connection master;
drop table t;
connection slave;
connection master;
#
# End of 11.2 tests (Two-phase alter)
#
connection slave;
include/stop_slave.inc
set global binlog_row_image=FULL;
set global slave_parallel_threads=0;
set global slave_parallel_mode= optimistic;
include/start_slave.inc
include/rpl_end.inc
|