mirror of
https://github.com/MariaDB/server.git
synced 2025-04-22 15:15:41 +02:00
80 lines
1.7 KiB
Text
80 lines
1.7 KiB
Text
connection node_2;
|
|
connection node_1;
|
|
connection node_2;
|
|
CREATE TABLE t1(a int not null primary key auto_increment,b int) engine=InnoDB;
|
|
insert into t1 values (NULL,1);
|
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|
connection node_2a;
|
|
begin;
|
|
update t1 set a = 5;
|
|
connection node_2;
|
|
select * from t1;
|
|
a b
|
|
2 1
|
|
disconnect node_2a;
|
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|
connection node_2a;
|
|
begin;
|
|
update t1 set a =5;
|
|
connection node_2;
|
|
select * from t1;
|
|
a b
|
|
2 1
|
|
disconnect node_2a;
|
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|
connection node_2a;
|
|
begin;
|
|
update t1 set a =5, b=2;
|
|
connection node_2;
|
|
ALTER TABLE t1 ADD UNIQUE KEY b1(b);
|
|
ALTER TABLE t1 DROP KEY b1;
|
|
select * from t1;
|
|
a b
|
|
2 1
|
|
disconnect node_2a;
|
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|
connection node_2a;
|
|
begin;
|
|
update t1 set a =5, b=2;
|
|
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|
connection node_2b;
|
|
begin;
|
|
update t1 set a =6, b=7;
|
|
connection node_2;
|
|
ALTER TABLE t1 ADD UNIQUE KEY b2(b);
|
|
ALTER TABLE t1 DROP KEY b2;
|
|
select * from t1;
|
|
a b
|
|
2 1
|
|
disconnect node_2a;
|
|
disconnect node_2b;
|
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|
connection node_2a;
|
|
SET SESSION wsrep_on=OFF;
|
|
begin;
|
|
update t1 set a =5, b=2;
|
|
connection node_2;
|
|
ALTER TABLE t1 ADD UNIQUE KEY b3(b);
|
|
connection node_2b;
|
|
SET SESSION wsrep_sync_wait=0;
|
|
connection node_2a;
|
|
select * from t1;
|
|
a b
|
|
5 2
|
|
commit;
|
|
connection node_2;
|
|
disconnect node_2a;
|
|
disconnect node_2b;
|
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|
connection node_2a;
|
|
SET SESSION wsrep_on=OFF;
|
|
begin;
|
|
update t1 set a =5, b=2;
|
|
connection node_2;
|
|
select * from t1;
|
|
a b
|
|
5 2
|
|
disconnect node_2a;
|
|
connection node_1;
|
|
drop table t1;
|