On 1/8/07, Ken <[EMAIL PROTECTED]> wrote:

You could always implement a sqlite3_open call and store it in the g
variable, and close it when the server quits.


Thanks for your response, Ken.  I'm not sure I've explained myself
properly.  It's not that I'm calling sqlite3_enable_shared_cache()
multiple times.  It's that if I don't maintain a persistent connection while
the server is running I end up with a dangling pointer and an error.

1. start server thread
   a. calls sqlite3_enable_shared_cache()
   b. waits for incoming commands
2. open connection #1
3. open connection #2
4. prepare and step a query with connection #1 (through the server)
5. close connection #1
6. prepare a query with connection #2 (through the server)

The issue is that at step #6, I get the "no such collation sequence" error
because some memory (the collation sequence names) that the shared schema
structures depended on went away in step 5.

I'm wondering if I'm misunderstanding something, and if there's any RTFM'ing
I should have done, cuz I'm not seeing this as a requirement in any of the
docs I read on the subject.

Thanks,
Pete.

Reply via email to