Hi,

I am using SQLite 3.7.9, and QNX 6.5.0 running on Intel x86 machine. I am
having a use-case with multiple readers threads and one writer thread, all
running in the same process. No other process is using the SQLite database
file.

I tried to enable WAL feature, but with no success so far. Each thread has
it's own handle:

res = sqlite3_open_v2( m_FilePath.getBuffer(), &dbHandle,
SQLITE_OPEN_READWRITE|SQLITE_OPEN_WAL|SQLITE_OPEN_FULLMUTEX|SQLITE_OPEN_PRIVATECACHE,
NULL );

immediately after I am making these PRAGMA statements for the new opened
handle

"PRAGMA main.journal_mode=WAL;"
"PRAGMA temp_store=MEMORY;"

So if I have 5 threads, I am calling the above sequence 5 times for each
distinct handle

When the code is executed I am getting frequently "databed locked"
messages. I tried to diagnose the issue, by enabling also the WAL traces in
the SQLite amalgamation, but I noticed no message, so for me it looks like
the WAL feature was not enabled. By analyzing the existed traces it looks
like thread 2 - reader is getting a SHARED lock, while later process 3 -
writer is trying to get an EXCLUSIVE lock.

Any suggestion would be appreciated.

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

Reply via email to