⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
mysql
/
mysql-test
/
suite
/
ndb
/
r
/
View File Name :
ndb_fk_self_ref.result
create table t1 ( a int not null, b int not null, c int not null, d int not null, e int not null, f int not null, primary key (a), unique(c) using hash, index(e)) engine = ndb; alter table t1 add constraint fkname foreign key (a) references t1(a) on delete restrict on update restrict; insert into t1 values (1,1,1,1,1,1); alter table t1 drop foreign key fkname; delete from t1; alter table t1 add constraint fkname foreign key (c) references t1(a) on delete restrict on update restrict; insert into t1 values (1,1,1,1,1,1); insert into t1 values (2,2,3,3,2,2); ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (Unknown error code) alter table t1 drop foreign key fkname; delete from t1; alter table t1 add constraint fkname foreign key (e) references t1(a) on delete restrict on update restrict; insert into t1 values (1,1,1,1,1,1); insert into t1 values (2,2,2,2,3,3); ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (Unknown error code) alter table t1 drop foreign key fkname; delete from t1; alter table t1 add constraint fkname foreign key (a) references t1(c) on delete restrict on update restrict; insert into t1 values (2,2,3,3,2,2); ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (Unknown error code) alter table t1 drop foreign key fkname; delete from t1; alter table t1 add constraint fkname foreign key (c) references t1(c) on delete restrict on update restrict; alter table t1 drop foreign key fkname; delete from t1; alter table t1 add constraint fkname foreign key (e) references t1(c) on delete restrict on update restrict; insert into t1 values (2,2,2,2,3,3); ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (Unknown error code) alter table t1 drop foreign key fkname; delete from t1; drop table t1; create table t1 ( a int not null, b int not null, c int not null, d int not null, e int not null, f int not null, primary key (a,b), unique(c,d) using hash, index(e,f)) engine = ndb; alter table t1 add constraint fkname foreign key (a,b) references t1(a,b) on delete no action on update no action; insert into t1 values (1,1,1,1,1,1); alter table t1 drop foreign key fkname; delete from t1; alter table t1 add constraint fkname foreign key (c,d) references t1(a,b) on delete no action on update no action; insert into t1 values (1,1,1,1,1,1); insert into t1 values (2,2,3,3,2,2); ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (Unknown error code) alter table t1 drop foreign key fkname; delete from t1; alter table t1 add constraint fkname foreign key (e,f) references t1(a,b) on delete no action on update no action; insert into t1 values (1,1,1,1,1,1); insert into t1 values (2,2,2,2,3,3); ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (Unknown error code) alter table t1 drop foreign key fkname; delete from t1; alter table t1 add constraint fkname foreign key (a,b) references t1(c,d) on delete no action on update no action; insert into t1 values (1,1,1,1,1,1); insert into t1 values (2,2,3,3,2,2); ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (Unknown error code) alter table t1 drop foreign key fkname; delete from t1; alter table t1 add constraint fkname foreign key (c,d) references t1(c,d) on delete no action on update no action; insert into t1 values (1,1,1,1,1,1); alter table t1 drop foreign key fkname; delete from t1; alter table t1 add constraint fkname foreign key (e,f) references t1(c,d) on delete no action on update no action; insert into t1 values (1,1,1,1,1,1); insert into t1 values (2,2,2,2,3,3); ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (Unknown error code) alter table t1 drop foreign key fkname; delete from t1; drop table t1;