| 1 |
--source include/galera_cluster.inc |
| 2 |
|
| 3 |
create table p (i varchar(100) primary key, j int) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 4 |
create table c1 (i int primary key auto_increment, j varchar(100), k int, key(j), constraint fk1 foreign key (j) references p(i)) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 5 |
create table c2 (i int primary key auto_increment, j varchar(100), k int, key(j), constraint fk2 foreign key (j) references p(i)) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| 6 |
insert into p values('sippo',1); |
| 7 |
insert into c1 values(1,'sippo',1); |
| 8 |
insert into c2 values(1,'sippo',1); |
| 9 |
update c1 set k = 100 where j = 'sippo'; |
| 10 |
insert into c1 values(2,'sippo',1); |
| 11 |
select * from p; |
| 12 |
select * from c1; |
| 13 |
select * from c2; |
| 14 |
|
| 15 |
--connection node_2 |
| 16 |
select * from p; |
| 17 |
select * from c1; |
| 18 |
select * from c2; |
| 19 |
|
| 20 |
--connection node_1 |
| 21 |
drop table c1; |
| 22 |
drop table c2; |
| 23 |
drop table p; |