On 13 Nov 2013, at 4:04pm, Sandu Buraga <sandu.bur...@gmail.com> wrote:
> But, after I enable the WAL mode the > consequent transactions (in any other threads) will go in database lock. WAL mode is saved with the database. Once you have enabled WAL mode, that setting is stored with the database for all time until you use another PRAGMA command to change it. Anything else opening the database will notice that it's already in WAL mode. > PRAGMA locking_mode=EXCLUSIVE Setting the journal mode to WAL while the locking-mode is EXCLUSIVE locks the current locking mode. You cannot change it again afterwards without switching back out of WAL mode. As a consequence of the above neither commands 4.b nor 4.c have any effect. I suspect that it's your use of EXCLUSIVE mode that's causing your problem. So please remove this setting, and make sure it's removed by checking PRAGMA locking_mode; and then try your test again and see if you're still getting unwanted locking. > The code used to open the the database is: > > int res = sqlite3_open_v2( m_FilePath.getBuffer(), &dbHandle, > SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_WAL|SQLITE_OPEN_FULLMUTEX|SQLITE_OPEN_PRIVATECACHE, > NULL ); According to the documentation the SQLITE_OPEN_WAL constant is for the VFS only. I don't know it'll do any harm but I don't know it does anything. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users