Hello

We found some strange behavior we can not explain. We execute the following script:

PRAGMA foreign_keys = ON;

create table a ( id int primary key );
create table b ( id int primary key );
create table c (id int primary key, aid int, bid int, foreign key (aid) references a (id) on delete cascade, foreign key (bid) references b (id) on delete cascade );

insert into a values(1);
insert into b values(1);
insert into c values(1,1,1);

drop table a;
drop table b;
drop table c;

Questions:
Why is "drop table a" possible? It breaks the schema.
Why is "drop table b" causing the exception "Error: no such table: main.a" and what is the meaning of this message? Table b don't references a directly.

Best regards,
Lukas

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to