mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
Add test case for
https://bugs.launchpad.net/percona-xtradb-cluster/+bug/1314854
This commit is contained in:
parent
84b3ec1fa4
commit
3d1ac12177
3 changed files with 39 additions and 0 deletions
19
mysql-test/suite/wsrep/r/foreign_key.result
Normal file
19
mysql-test/suite/wsrep/r/foreign_key.result
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
USE test;
|
||||||
|
create table p(v varchar(20), i int, primary key(v,i)) engine=innodb character set = utf8;
|
||||||
|
create table c(k int primary key, v varchar(20), i int, foreign key(v,i) references p(v,i)) engine=innodb character set = utf8;
|
||||||
|
insert into p values (_utf32 0x000004100000041100000412, 1);
|
||||||
|
insert into c values (1, _utf32 0x000004100000041100000412, 1);
|
||||||
|
SELECT * FROM test.p;
|
||||||
|
v i
|
||||||
|
??? 1
|
||||||
|
SELECT * FROM test.c;
|
||||||
|
k v i
|
||||||
|
1 ??? 1
|
||||||
|
SELECT * FROM test.p;
|
||||||
|
v i
|
||||||
|
??? 1
|
||||||
|
SELECT * FROM test.c;
|
||||||
|
k v i
|
||||||
|
1 ??? 1
|
||||||
|
DROP TABLE c;
|
||||||
|
DROP TABLE p;
|
||||||
1
mysql-test/suite/wsrep/t/foreign_key.opt
Normal file
1
mysql-test/suite/wsrep/t/foreign_key.opt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm://
|
||||||
19
mysql-test/suite/wsrep/t/foreign_key.test
Normal file
19
mysql-test/suite/wsrep/t/foreign_key.test
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
--source include/have_wsrep_enabled.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
USE test;
|
||||||
|
create table p(v varchar(20), i int, primary key(v,i)) engine=innodb character set = utf8;
|
||||||
|
create table c(k int primary key, v varchar(20), i int, foreign key(v,i) references p(v,i)) engine=innodb character set = utf8;
|
||||||
|
insert into p values (_utf32 0x000004100000041100000412, 1);
|
||||||
|
insert into c values (1, _utf32 0x000004100000041100000412, 1);
|
||||||
|
|
||||||
|
SELECT * FROM test.p;
|
||||||
|
SELECT * FROM test.c;
|
||||||
|
|
||||||
|
SELECT * FROM test.p;
|
||||||
|
SELECT * FROM test.c;
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
DROP TABLE c;
|
||||||
|
DROP TABLE p;
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue