On 6/15/06, James Butts <[EMAIL PROTECTED]> wrote:
>
> In the main thread, I open a connection to database and create a timer
> function and start a worker thread.  The worker thread establishes its own
> separate connection to database.  The worker thread creates a table and
> then signals the main thread.  The timer function in the main thread drops
> the table and signals back to the worker thread.  The worker thread
> creates the table again and receives no error.  However, if the worker
> thread tries to insert a record into that table, I get back a SQLITE_ERROR
> error.
>

>Are you perhaps getting a "schema changed" error?
>It has to recache the new schema after the drop.
>If the other thread has it open that can easily happen.

I'm not sure how that is possible.  My example code used sqlite3_exec which
internally handles schema changed errors by retrying.  The API call
sqlite3_exec also finalizes each command.  My code is set up lock-step so
work is only being performed in one thread at any point in time.


--
View this message in context: 
http://www.nabble.com/Multiple-Threads-with-a-DROP-command-t1792339.html#a4883955
Sent from the SQLite forum at Nabble.com.

Reply via email to