I have a database file that was created with version 3.4.1.  It _may_ have
been written to at some point with 3.5.3 - can't say for sure.  At some
point a transaction was started and the app was stopped (probably me in the
debugger).  I assume I was using 3.4.1 at the time it but it could
potentially have been 3.5.3 (working with two different code bases on and
off).

 

So at this moment I have in the directory:

Myproj.db

Myproj.db-journal

 

I call sqlite3_open16 and it seems to work fine.

 

When I call sqlite3_prepare16_v2 on "PRAGMA synchronous=0; PRAGMA
temp_store=2;" I get back SQLITE_BUSY.  When I get SQLITE_BUSY my wrapper
pauses a bit and then calls sqlite3_prepare16_v2 again, but it doesn't help
because SQLITE_BUSY is returned again.  No other process is using the
database (I rebooted to make sure there weren't any locks hanging around).  

 

The original database was created and written to with synchronous=0,
although there haven't been any machine crashes.  Deleting the database
isn't a big deal since it's my test machine, but I'm trying to figure out
how to handle this if it comes up in production.  

 

One thing that seems strange is the journal file still exists.  I thought
sqlite3_open16 would have seen it and rolled back the transaction.  Is this
just a case of an older version trying to read a newer version of the
database and failing, but returning a non-helpful error?

 

Thanks for any direction anyone can provide.

 

Reply via email to