| 1 |
drop table if exists parentt1, childt2, childt3; |
| 2 |
create table parentt1( |
| 3 |
a int not null, |
| 4 |
b int not null, |
| 5 |
c int not null, |
| 6 |
unique key uk13(c) |
| 7 |
)engine=ndb; |
| 8 |
create table childt2( |
| 9 |
a int, |
| 10 |
b int, |
| 11 |
c int, |
| 12 |
d int, |
| 13 |
e int, |
| 14 |
foreign key fk21(a) references parentt1(c), |
| 15 |
foreign key fk22(b) references parentt1(c), |
| 16 |
foreign key fk23(c) references parentt1(c), |
| 17 |
foreign key fk24(d) references parentt1(c), |
| 18 |
foreign key fk25(e) references parentt1(c) |
| 19 |
)engine=ndb; |
| 20 |
create table childt3( |
| 21 |
a int, |
| 22 |
b int, |
| 23 |
c int, |
| 24 |
d int, |
| 25 |
e int, |
| 26 |
foreign key fk31(a) references parentt1(c), |
| 27 |
foreign key fk32(b) references parentt1(c), |
| 28 |
foreign key fk33(c) references parentt1(c), |
| 29 |
foreign key fk34(d) references parentt1(c), |
| 30 |
foreign key fk35(e) references parentt1(c) |
| 31 |
)engine=ndb; |
| 32 |
update childt2 set a=10000, b=10000, c=10000, d=10000, e=10000; |
| 33 |
update childt3 set a=10000, b=10000, c=10000, d=10000, e=10000; |
| 34 |
drop table childt2, childt3; |
| 35 |
drop table parentt1; |