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