On Thu, Jul 8, 2010 at 12:45 AM, Max Vlasov <max.vla...@gmail.com> wrote:
> Alexey, > > I read this sentence, but it didn't help. > So I suppose there's a bug in PRAGMA journal_mode logic > Steps to reproduce. > > 1. Create an empty base with some table. > Look at the 18,19 offsets, they both = 1, it's ok, the base is compatible > with full range of sqlite3 versions. > > 2. Do PRAGMA journal_mode=WAL; , it returns wal, so WAL is set. > Look at the 18,19 offsets, they both = 2, the base no longer compatible > with > older versions, checking... yes, they say "encrypted" or something. > Query PRAGMA journal_mode; alone (just to check not set) , it still says > "wal", ok > > 3. Close the database. offsets 18,19 still = 2, so the WAL setting are kept > between sessions. > > 4. Open the db again, offsets 18,19 still = 2, > query PRAGMA journal_mode; it says "delete", but definetely should return > "wal". > You want "PRAGMA main.journal_mode" A "PRAGMA journal_mode;" (without the "main.") shows you the default journal mode used by newly created databases, which is always "DELETE" unless you have changed it with a prior "PRAGMA journal_mode=MODE" command. Though, I will admit, this is confusing, and I was thinking last night about ways we could possibly change it.... > > Max > > > On Thu, Jul 8, 2010 at 12:09 AM, Alexey Pechnikov <pechni...@mobigroup.ru > >wrote: > > > See http://sqlite.org/draft/wal.html : > > > > <http://sqlite.org/draft/wal.html>"An SQLite database _connection_ > > defaults > > to journal_mode=DELETE. To convert to WAL mode, use the following > > pragma: PRAGMA journal_mode=WAL;" > > > > -- > > Best regards, Alexey Pechnikov. > > http://pechnikov.tel/ > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- --------------------- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users