SQLite Forum

Bug report: equivalence transfer results in incorrect output
Yes, this is a bug.  It has been in the code for a long time.  It is due
to an adverse interaction between the likely() function and the equivalence
transfer optimization, as you conjecture.  We are working on a solution.

You may have noticed recent check-ins that do not fix the problem, but do
provide additional diagnostic output when using ".wheretrace" in the CLI.
Those check-ins are related to our efforts to fix the problem.