On 17 Dec 2012, at 8:35pm, "Marc L. Allen" <mlal...@outsitenetworks.com> wrote:

> Another item.. when having Journal Mode = PERSIST, DBA (in the example below) 
> was not being physically updated.  DBB was.

I can think of a reason you might not be able to see an update until you have 
executed _close().  So are you looking to see an update before or after your 
code has executed _close() ?  How are you looking for an update ?  The file's 
modification timestamp ?  Also, are you sure you are executing _close() with 
the right parameter, and can you check the result returned from _close() to 
make sure it returns SQLITE_OK ?

> Simply taking out the PRAGMA fixed things.  Any ideas where I should look?

Clip from your earlier post:

> open(DBA)
> PRAGMA journal_mode = PERSIST;
> ATTACH DBB
> SQL ...
> close()
> 
> If the DBA.journal file exists, it's deleted before the attach (though I 
> haven't identified exactly where.  I can if important.) During the close, the 
> DBA.mjxxxxx is deleted as is the DBB.journal file.
> The DBA.journal file is not deleted until the next time I open it.

One situation I think might cause this is if the database isn't closed 
properly.  When SQLite reopens the database it realises it is corrupt.  It 
restores the database to a usable condition, then (this is just a guess) it 
deletes the old journal so it can make a new uncorrupted one.

However, I can't answer your basic problem.  I see no reason why these things 
should change just because you're using PERSIST mode.  But there are people who 
understand SQLite internals better than I do.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to