SQLite Forum

A crash bug in MULTI-INDEX OR
Login
A very interesting problem. The query planner tries to use index i1 as a
covering index, but because of the unusual INDEXED BY clause and the likely()
function, it ends up not initializing the cursor to the index in time for the
OP_NullRow opcode that occurs as part of LEFT JOIN processing.  The problem
is associated with the [Multi-OR covering index optimization][1] from 2012.
But it is unclear whether or not the exact set of circumstances that trigger
the problem could be reached until other more recent optimizations were also
put in place.

Fixed [on trunk][2].  Two alternative fixes are shown on [nearby branches][3]


[1]: src:/info/62678be3df35cdcb
[2]: src:/info/787c76a865dc51db
[3]: src:/timeline?c=787c76a865dc51db&y=ci&n=5