[sqlite] sqlite3_enable_shared_cache in 3.3.5

2006-04-10 Thread Roger Binns
I am always getting back SQLITE_OK from this routine. It is immaterial if I have open sqlite3* or even a currently running statement (eg a "select .." sitting at SQLITE_ROW). I am seeing this with both Windows and Linux. The code is running in the Python environment. This is all in the main thr

Re: [sqlite] sqlite3_enable_shared_cache

2006-04-04 Thread Roger Binns
Changing the setting while a session is active will lead to serious problems. That's why I added a check for that behavior that makes the routine return SQLITE_MISUSE instead. Ok, then the documentation is wrong as it says calling the routine when connections exist will cause memory corruption.

Re: [sqlite] sqlite3_enable_shared_cache

2006-04-04 Thread drh
"Roger Binns" <[EMAIL PROTECTED]> wrote: > > If you call sqlite3_enable_shared_cache while > > another connection is open, you will get an > > SQLITE_MISUSE error. But you can ignore that > > error if you want. > > The doc is far scarier: > > This routine must not be called when any database

Re: [sqlite] sqlite3_enable_shared_cache

2006-04-04 Thread Roger Binns
If you call sqlite3_enable_shared_cache while another connection is open, you will get an SQLITE_MISUSE error. But you can ignore that error if you want. The doc is far scarier: This routine must not be called when any database connections are active in the current thread. Enabling or dis

Re: [sqlite] sqlite3_enable_shared_cache

2006-04-04 Thread drh
"Roger Binns" <[EMAIL PROTECTED]> wrote: > I'd like to use sqlite3_enable_shared_cache in > my APSW wrapper but I can't see a sensible > safe way of doing it. The wrapper already enforces > the conditions mentioned in the doc (all operations > on a handle happening in the same thread). > > It lo

[sqlite] sqlite3_enable_shared_cache

2006-04-04 Thread Roger Binns
I'd like to use sqlite3_enable_shared_cache in my APSW wrapper but I can't see a sensible safe way of doing it. The wrapper already enforces the conditions mentioned in the doc (all operations on a handle happening in the same thread). It looks like I'd have to do a lot of housekeeping calling