Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 230 additions & 0 deletions mysql-test/suite/ndb/r/bug_rondb-620.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
use test;
Case: (a,b) P<-P (b,a)
create table t1 (
a int not null,
b int not null,
primary key (a,b)
) engine=ndbcluster;
create table t2 (
b int not null,
a int not null,
primary key (b,a),
constraint fk1 foreign key (b, a) references t1 (b, a)
) engine=ndbcluster;
insert into t1 (a, b) values (1, 2);
insert into t2 (b, a) values (2, 1);
Backing up data
Restoring data
select * from t1;
a b
1 2
select * from t2;
b a
2 1
Case: (a,b) <-P (b,a)
create table t1 (
a int not null,
b int not null,
primary key (b),
unique key (a,b)
) engine=ndbcluster;
create table t2 (
b int not null,
a int not null,
primary key (b,a),
constraint fk1 foreign key (b, a) references t1 (b, a)
) engine=ndbcluster;
insert into t1 (a, b) values (1, 2);
insert into t2 (b, a) values (2, 1);
Backing up data
Restoring data
select * from t1;
a b
1 2
select * from t2;
b a
2 1
b a
2 1
Case: (a,b) <- (b,a)
create table t1 (
a int not null,
b int not null,
primary key (b),
unique key (a,b)
) engine=ndbcluster;
create table t2 (
b int not null,
a int not null,
primary key (a),
unique key (b,a),
constraint fk1 foreign key (b, a) references t1 (b, a)
) engine=ndbcluster;
insert into t1 (a, b) values (1, 2);
insert into t2 (b, a) values (2, 1);
Backing up data
Restoring data
select * from t1;
a b
1 2
select * from t2;
b a
2 1
b a
2 1
Case: (a,b) P<- (b,a)
create table t1 (
a int not null,
b int not null,
primary key (a,b)
) engine=ndbcluster;
create table t2 (
b int not null,
a int not null,
primary key (a),
unique key (b,a),
constraint fk1 foreign key (b, a) references t1 (b, a)
) engine=ndbcluster;
insert into t1 (a, b) values (1, 2);
insert into t2 (b, a) values (2, 1);
Backing up data
Restoring data
select * from t1;
a b
1 2
select * from t2;
b a
2 1
b a
2 1
Case: (a,_c,b) P<-P (b,a)
create table t1 (
a int not null,
_c int not null,
b int not null,
primary key (a,b)
) engine=ndbcluster;
create table t2 (
b int not null,
a int not null,
primary key (b,a),
constraint fk1 foreign key (b, a) references t1 (b, a)
) engine=ndbcluster;
insert into t1 (a, b, _c) values (1, 2, 3);
insert into t2 (b, a) values (2, 1);
Backing up data
Restoring data
select * from t1;
a _c b
1 3 2
select * from t2;
b a
2 1
b a
2 1
Case: (a,b) P<-P (b,_c,a)
create table t1 (
a int not null,
b int not null,
primary key (a,b)
) engine=ndbcluster;
create table t2 (
b int not null,
_c int not null,
a int not null,
primary key (b,a),
constraint fk1 foreign key (b, a) references t1 (b, a)
) engine=ndbcluster;
insert into t1 (a, b) values (1, 2);
insert into t2 (b, a, _c) values (2, 1, 3);
Backing up data
Restoring data
select * from t1;
a b
1 2
select * from t2;
b _c a
2 3 1
b _c a
2 3 1
Case: (_c,a,b) P<-P (b,a,_c)
create table t1 (
_c int not null,
a int not null,
b int not null,
primary key (a,b)
) engine=ndbcluster;
create table t2 (
b int not null,
a int not null,
_c int not null,
primary key (b,a),
constraint fk1 foreign key (b, a) references t1 (b, a)
) engine=ndbcluster;
insert into t1 (a, b, _c) values (1, 2, 3);
insert into t2 (b, a, _c) values (2, 1, 3);
Backing up data
Restoring data
select * from t1;
_c a b
3 1 2
select * from t2;
b a _c
2 1 3
b a _c
2 1 3
Case: (a,b) P<-P (b,a)
create table t1 (
a int not null,
b int not null,
primary key (a,b)
) engine=ndbcluster;
create table t2 (
b int not null,
a int not null,
primary key (b,a),
constraint fk1 foreign key (a, b) references t1 (a, b)
) engine=ndbcluster;
insert into t1 (a, b) values (1, 2);
insert into t2 (b, a) values (2, 1);
Backing up data
Restoring data
select * from t1;
a b
1 2
select * from t2;
b a
2 1
b a
2 1
Case: (a,b,_c,d,e) P<- (a,_c,e,d,b)
create table t1 (
a int not null,
b varchar(8) not null,
_c int not null,
d int not null,
e int not null,
primary key (a,b,d,e)
) engine=ndbcluster;
create table t2 (
a int not null,
_c int not null,
e int not null,
d int not null,
b varchar(8) not null,
primary key (a),
unique key (a,e,d,b),
constraint fk1 foreign key (b, e, d, a) references t1 (b, e, d, a)
) engine=ndbcluster;
insert into t1 (a, b, _c, d, e) values (1, "ABCD", 3, 4, 5);
insert into t2 (a, _c, e, d, b) values (1, 9, 5, 4, "ABCD");
Backing up data
Restoring data
select * from t1;
a b _c d e
1 ABCD 3 4 5
select * from t2;
a _c e d b
1 9 5 4 ABCD
a _c e d b
1 9 5 4 ABCD
3 changes: 3 additions & 0 deletions mysql-test/suite/ndb/t/bug_rondb-620.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
!include suite/ndb/my.cnf
[cluster_config]
ThreadConfig=ldm={count=2}
Loading