> The problem is not that table names aren't qualified.  The problem is that
> information for setting up the schema (structural components) of a SQLite
> database are stored in the database as the SQL commands rather than a
> complicated internal format.  This makes it permissable to do this:
>
> 1. set up a trigger that refers to a table called 'books'
> 2. use that trigger a number of times
> 3. delete the table 'books'
> 4. create a new table 'books'
> 5. use that trigger more times.
>
> An iron-bound high-end SQL implementation would prevent step 3 from
> happening with an error message.
>
>
I tried without success to reproduce this scenario.

create table t1(c);
create temporary trigger tr1 after insert on t1 begin select raise(abort,
'error'); end;
insert into t1(c) values(1); -- error is raised here
drop table t1;
create table t1(c);
insert into t1(c) values(1); -- no error here

It seems that, when the table dies, it takes the associated trigger down
with it. Are you saying that the ghost of the trigger may still exist
somewhere in internal SQL commands and may come back once in a while to
haunt the unsuspecting new table?

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

Reply via email to