dynamobi/dynamobi — Issue #261: [LDB-60] search condition sometimes returns rows which evaluate to unknown
Author: dynamobi-build
Created: 2011-12-30 02:25:15+00:00
State: open
Labels: LDB

[reporter="elin", created="Tue, 11 Apr 2006 18:33:45 -0500 (GMT-05:00)"]
To repro:

create schema s;

set schema 's';

create table test1 (col1 integer, col2 integer);

create index test1_col2 on test1(col2);

insert into test1 values

(1, 1), (2, cast(null as integer));

select col1,col2 from test1 where not (col2=1) order by 1,2;

you get:

+-------+-------+

| COL1 | COL2 |

+-------+-------+

| 2 | |

+-------+-------+

instead of no rows.

If the index is dropped and then recreated, the select query will return no rows, which is correct. Sometimes retrying the query will produce the incorrect results again.