Oh, nice catch.

Well, after I made the change I am still seeing the same issue. I added some
print statements that will maybe help.

It sounds like you might think it is because I am not closing my statement
is the reason I am getting this issue? I was thinking if it were only that
then no matter how long I wait, my next query would return only 9. But this
happens only if it is an immediate query, if I wait .5s then I get all 10
results.

It feels as if SQLite is acquiring the write lock, doing some work, then
releasing the lock. But it seems like SQLite still is doing some
writing/protecting of sort in the back ground, and this work is taking
longer than my next statement to come around and execute.

This is my Query
[Thread ID]
Bind Results - calls to get data from sqlite3_column_count,
sqlite3_column_int64, etc
Next - Row, - [SQLITE return code from sqlite3_step()]
--------------------------------------------------------------
[980] P Query Begin
[980]                           Acquire Mutex
[980] Prepare
[980] Execute
[980] Bind Results
Next - Row, 100
[980 ] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980] Bind Results
[980] Release
[980]                           Release Mutex
Result set has 10 entries

Then the Update
[10096]                                 Acquire Mutex
[10096] Begin Transaction
[10096] Prepare
[10096] Bind Blob
[10096] Execute
[10096] Release
[10096] End Transaction
[10096]                                 Release Mutex

Immediate Query after the Update
[980]                           Acquire Mutex
[980] Prepare
[980] Execute
[980] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980] Bind Results
Next - Row, 100
[980 ] Bind Results
Next - Row, 100
[980] Bind Results
[980] Release
[980]                           Release Mutex
Result set has 9 entries



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Memory-DB-Query-does-not-return-all-records-after-Update-tp67267p67333.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to