On Thu, May 9, 2013 at 8:48 AM, Romulo Ceccon <romulocec...@gmail.com>wrote:

>
> The following script demonstrates the problem:
>
> (test.sql)
>   CREATE TABLE t(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
>     a INTEGER, b INTEGER);
>   CREATE TABLE mutex(i INTEGER);
>   INSERT INTO mutex(i) VALUES (0);
>   INSERT INTO mutex(i) VALUES (1);
>   INSERT INTO t(a, b) VALUES (1, 2);
>   SELECT * FROM t;
>   SELECT 'not found (1)'
>     FROM mutex LEFT JOIN t
>     ON a = 1 AND b = 2
>     WHERE i = 1 AND id IS NULL;
>   SELECT 'not found (2)'
>     FROM mutex LEFT JOIN t
>     ON a = 1 OR b = 2
>     WHERE i = 1 AND id IS NULL;
>

Simpler demonstration here: http://www.sqlite.org/src/info/f2369304e4


-- 
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