On Tue, Feb 25, 2014 at 11:32 AM, Mark Lawrence <no...@null.net> wrote:

>
> Righto, now included *inline* is the following:
>
>     * Schema for the tables
>
>     * Rows for the tables
>
>     * 4 queries demonstrating the issue:
>         1. Single SELECT query #1
>         2. Single SELECT query #2
>         3. UNION ALL query of #1 and #2
>         4. UNION ALL query of #1 and #2 plus ORDER BY
>
>
>
Thanks for the script.  This is definitely a bug.  Your script fails in all
SQLite versions 3.8.0 and later.  But the problem appears to predate even
3.8.0 - it is just that the changes in the query planner for version 3.8.0
brought out the bug in your particular script.  It may well be possible to
express the same bug in earlier versions of SQLite, going back to many
years, using alternative scripts.

The ticket is http://www.sqlite.org/src/info/8c63ff0eca

The problem is that in the virtual machine that SQLite uses, a pair of
concurrent co-routines (one for each of the two SELECTs in the UNION ALL)
are both trying to use the same temporary register at the same time.
Bummer.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to