[sqlite] union, order by, and a phantom record

2016-02-08 Thread R Smith
Definitely a bug: I distilled the OP's code into an easy repeatable test case - --- create table t(id integer primary key autoincrement, a, b, c); insert into t values (3,1 ,'name','Imogen') ,(5,1 ,'gender' ,'female') ,(6,1 ,'son' ,'

[sqlite] union, order by, and a phantom record

2016-02-08 Thread Richard Hipp
On 2/8/16, Richard Hipp wrote: > On 2/8/16, Poor Yorick wrote: >> The following query produces a third phantom record on my system: > > Running "PRAGMA automatic_index=OFF;" might alleviate the symptoms > your are experiencing, until we can get a proper fix published. > The bug appears to be qui

[sqlite] union, order by, and a phantom record

2016-02-08 Thread Poor Yorick
On 2016-02-08 19:15, Richard Hipp wrote: > On 2/8/16, Richard Hipp wrote: >> On 2/8/16, Poor Yorick wrote: >>> The following query produces a third phantom record on my system: >> >> Running "PRAGMA automatic_index=OFF;" might alleviate the symptoms >> your are experiencing, until we can get a p

[sqlite] union, order by, and a phantom record

2016-02-08 Thread Richard Hipp
On 2/8/16, Poor Yorick wrote: > The following query produces a third phantom record on my system: Running "PRAGMA automatic_index=OFF;" might alleviate the symptoms your are experiencing, until we can get a proper fix published. > > > = start script = > package require sqlite3 > > sqlite

[sqlite] union, order by, and a phantom record

2016-02-08 Thread Richard Hipp
On 2/8/16, R Smith wrote: > Definitely a bug: I distilled the OP's code into an easy repeatable test > case - https://www.sqlite.org/src/tktview/d06a25c84454a372be4e4c970c3c4d4363197219 -- D. Richard Hipp drh at sqlite.org

[sqlite] union, order by, and a phantom record

2016-02-08 Thread Poor Yorick
The following query produces a third phantom record on my system: = start script = package require sqlite3 sqlite3 [namespace current]::db :memory: db eval { create table if not exists eav ( id integer primary key autoincrement ,entity numeric ,attribute