>
> c) Anthony tried to force the transaction open with the FOR UPDATE clause, 
> but that doesn’t work in SQLite.
>

To clarify, in recognition of the fact that SQLite does not support "FOR 
UPDATE", the DAL attempts to simulate it with SQLite by instead preceding 
the select with "BEGIN IMMEDIATE TRANSACTION" (this works in non-WAL mode 
because it locks the entire database for reads and writes). However, a bug 
was introduced to the DAL whereby in addition to executing "BEGIN IMMEDIATE 
TRANSACTION", it now *also* adds "FOR UPDATE" to the select itself, which 
results in an exception. My suggested workaround is to *not* use .select(..., 
for_update=True), which is broken, and to manually do what for_update used 
to do with SQLite, which is to execute "BEGIN IMMEDIATE TRANSACTION". I 
have opened an issue on Github regarding the bug.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to