| 1 |
connection node_2; |
| 2 |
connection node_1; |
| 3 |
connection node_2; |
| 4 |
call mtr.add_suppression("InnoDB: Transaction was aborted due to "); |
| 5 |
CREATE TABLE t1(a int not null primary key auto_increment,b int) engine=InnoDB; |
| 6 |
insert into t1 values (NULL,1); |
| 7 |
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; |
| 8 |
connection node_2a; |
| 9 |
call mtr.add_suppression("InnoDB: Transaction was aborted due to "); |
| 10 |
begin; |
| 11 |
update t1 set a = 5; |
| 12 |
connection node_2; |
| 13 |
select * from t1; |
| 14 |
a b |
| 15 |
2 1 |
| 16 |
disconnect node_2a; |
| 17 |
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; |
| 18 |
connection node_2a; |
| 19 |
begin; |
| 20 |
update t1 set a =5; |
| 21 |
connection node_2; |
| 22 |
select * from t1; |
| 23 |
a b |
| 24 |
2 1 |
| 25 |
disconnect node_2a; |
| 26 |
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; |
| 27 |
connection node_2a; |
| 28 |
begin; |
| 29 |
update t1 set a =5, b=2; |
| 30 |
connection node_2; |
| 31 |
ALTER TABLE t1 ADD UNIQUE KEY b1(b); |
| 32 |
ALTER TABLE t1 DROP KEY b1; |
| 33 |
select * from t1; |
| 34 |
a b |
| 35 |
2 1 |
| 36 |
disconnect node_2a; |
| 37 |
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; |
| 38 |
connection node_2a; |
| 39 |
begin; |
| 40 |
update t1 set a =5, b=2; |
| 41 |
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2; |
| 42 |
connection node_2b; |
| 43 |
begin; |
| 44 |
update t1 set a =6, b=7; |
| 45 |
connection node_2; |
| 46 |
ALTER TABLE t1 ADD UNIQUE KEY b2(b); |
| 47 |
ALTER TABLE t1 DROP KEY b2; |
| 48 |
select * from t1; |
| 49 |
a b |
| 50 |
2 1 |
| 51 |
disconnect node_2a; |
| 52 |
disconnect node_2b; |
| 53 |
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; |
| 54 |
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2; |
| 55 |
connection node_2a; |
| 56 |
SET SESSION wsrep_on=OFF; |
| 57 |
begin; |
| 58 |
update t1 set a =5, b=2; |
| 59 |
connection node_2; |
| 60 |
ALTER TABLE t1 ADD UNIQUE KEY b3(b); |
| 61 |
connection node_2b; |
| 62 |
SET SESSION wsrep_sync_wait=0; |
| 63 |
connection node_2a; |
| 64 |
select * from t1; |
| 65 |
a b |
| 66 |
5 2 |
| 67 |
commit; |
| 68 |
connection node_2; |
| 69 |
disconnect node_2a; |
| 70 |
disconnect node_2b; |
| 71 |
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; |
| 72 |
connection node_2a; |
| 73 |
SET SESSION wsrep_on=OFF; |
| 74 |
begin; |
| 75 |
update t1 set a =5, b=2; |
| 76 |
connection node_2; |
| 77 |
select * from t1; |
| 78 |
a b |
| 79 |
5 2 |
| 80 |
disconnect node_2a; |
| 81 |
connection node_1; |
| 82 |
drop table t1; |