Re: [sqlite] Endless loop possible with simultaneous SELECT and UPDATE?

2019-09-03 Thread Keith Medcalf
On Tuesday, 3 September, 2019 15:01, Kees Nuyt wrote: >On Tue, 3 Sep 2019 18:26:01 +0100, you wrote: >>> // do SELECT on db1 >>> // do UPDATE on db2 >> Do you expect the SELECT to see the results of the previous >> UPDATE ? It won't, until the transaction has ended >> (unless you arrange

Re: [sqlite] Endless loop possible with simultaneous SELECT and UPDATE?

2019-09-03 Thread Kees Nuyt
On Tue, 3 Sep 2019 18:26:01 +0100, you wrote: >> // do SELECT on db1 >> // do UPDATE on db2 > > Do you expect the SELECT to see the results of the previous > UPDATE ? It won't, until the transaction has ended > (unless you arrange this explicitly). That's the nice thing about this construct:

Re: [sqlite] Endless loop possible with simultaneous SELECT and UPDATE?

2019-09-03 Thread Simon Slavin
On 3 Sep 2019, at 5:34pm, Alexander Vega wrote: > sqlite3_open("database1", ); > sqlite3_open("database1", ); Bear in mind that SQLite is not a server/client DBMS. The database is not kept in memory (unless you arrange this explicitly). All operations have to wait for the storage that holds

Re: [sqlite] Endless loop possible with simultaneous SELECT and UPDATE?

2019-09-03 Thread Alexander Vega
So in the original code if I added a NOT INDEXED it would be valid? Also, would an ORDER BY Auth_id ASC fix the issue, since I an not adding any new rows the auth_ids would remain constant? Wow I did not know that you could call open multiple times on the same database! So the following is valid

Re: [sqlite] Endless loop possible with simultaneous SELECT and UPDATE?

2019-09-01 Thread Keith Medcalf
On Sunday, 1 September, 2019 11:12, Alexander Vega wrote: >Thank you Keith for your answer. It has led me to more questions. >"though you may or may not have visited all rows" >From the documentation I did not get the impression that you would >ever not visit ALL ROWS at least once. Is there a

Re: [sqlite] Endless loop possible with simultaneous SELECT and UPDATE?

2019-09-01 Thread Alexander Vega
Thank you Keith for your answer. It has led me to more questions. "though you may or may not have visited all rows" From the documentation I did not get the impression that you would ever not visit ALL ROWS at least once. Is there a technical reason for this? I would assume a full table scan is

Re: [sqlite] Endless loop possible with simultaneous SELECT and UPDATE?

2019-08-31 Thread Keith Medcalf
> Having read : https://www.sqlite.org/isolation.html > Specifically the line "And the application can UPDATE the current row > or any prior row, though doing so might cause that row to reappear in a > subsequent sqlite3_step()." > Is it possible to create and endless loop Eventually you will

[sqlite] Endless loop possible with simultaneous SELECT and UPDATE?

2019-08-31 Thread Alexander Vega
Having read : https://www.sqlite.org/isolation.html Specifically the line "And the application can UPDATE the current row or any prior row, though doing so might cause that row to reappear in a subsequent sqlite3_step()." Is it possible to create and endless loop with the following