summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/t/galera_fk_multibyte.test
blob: 4bc03b6d84b37b0daf1e07cac8f90b54f0c04e33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--source include/galera_cluster.inc

create table p (i varchar(100) primary key, j int) ENGINE=InnoDB DEFAULT CHARSET=utf8;
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;
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;
insert into p values('sippo',1);
insert into c1 values(1,'sippo',1);
insert into c2 values(1,'sippo',1);
update c1 set k = 100 where j = 'sippo';
insert into c1 values(2,'sippo',1);
select * from p;
select * from c1;
select * from c2;

--connection node_2
select * from p;
select * from c1;
select * from c2;

--connection node_1
drop table c1;
drop table c2;
drop table p;