[sqlite] DROP TABLE yields SQLITE_LOCKED from user-defined function

2011-07-07 Thread Ben Harper
I have a user-defined function that I register with create_function. Inside my function I try to drop an r-tree virtual table, but I get the error SQLITE_LOCKED. Is there something special one needs to do in order to drop a table from inside a user-defined function? To test, I call it simply

Re: [sqlite] DROP TABLE yields SQLITE_LOCKED from user-defined function

2011-07-07 Thread Pavel Ivanov
Is there something special one needs to do in order to drop a table from inside a user-defined function? To test, I call it simply like so: SELECT my_function(); It shouldn't be ever possible to change the database from within a function called from SELECT statement. SELECT query doesn't

Re: [sqlite] DROP TABLE yields SQLITE_LOCKED from user-defined function

2011-07-07 Thread Ben Harper
: Re: [sqlite] DROP TABLE yields SQLITE_LOCKED from user-defined function Is there something special one needs to do in order to drop a table from inside a user-defined function? To test, I call it simply like so: SELECT my_function(); It shouldn't be ever possible to change the database

Re: [sqlite] DROP TABLE yields SQLITE_LOCKED from user-defined function

2011-07-07 Thread Igor Tandetnik
On 7/7/2011 10:38 AM, Ben Harper wrote: I have a user-defined function that I register with create_function. Inside my function I try to drop an r-tree virtual table, but I get the error SQLITE_LOCKED. Is there something special one needs to do in order to drop a table from inside a

Re: [sqlite] DROP TABLE yields SQLITE_LOCKED from user-defined function

2011-07-07 Thread Pavel Ivanov
: [sqlite] DROP TABLE yields SQLITE_LOCKED from user-defined function Is there something special one needs to do in order to drop a table from inside a user-defined function? To test, I call it simply like so: SELECT my_function(); It shouldn't be ever possible to change the database from