SQLite Forum

table locked when dropping a temp table
Login
That is untrue, at least insofar as the description of the error:

```
sqlite> create table x(id integer primary key, x integer references y(id));
sqlite> create table y(id integer primary key, y);
sqlite> analyze main;
sqlite> insert into y select value, value from wholenumber where value between 1 and 10;
sqlite> insert into x select value, (value % 10) + 1 from wholenumber where value between 1 and 1000;
sqlite> drop table y;
Error: stepping, FOREIGN KEY constraint failed (19)
sqlite> delete from x;
sqlite> drop table y;
sqlite>
```