On 10/14/2016 04:59 PM, Hick Gunter wrote:
In the vdbeaux.c source, the function


is not resetting p->readOnly when it encounters an OP_VUpdate opcode

is not setting p->bIsReader when it encounters an OP_VFilter opcode

Additionally, the frunction


is only checking p->bIsReader and omitting to check p->readOnly

even though the comment claims to check "if the program never started or if the SQL 
Statement does not read or write a database file".

These omissions conspire to make SQLite refrain from calling the xSync and 
xCommit entrypoints of the virtual table named in an UPDATE, DELETE or INSERT 

Do you have a test case for this?

Trying to reproduce here, all VM programs for UPDATE/DELETE/INSERT also contain OP_Transaction opcodes. Which cause Vdbe.bIsReader to be set and so the xSync/xCommit methods are called. Do the VM programs (EXPLAIN output) for whatever statements you're testing with contain the OP_Transaction?


sqlite-users mailing list

Reply via email to