(text/x-fossil-wiki)
Consider the following test case:
<pre>
CREATE TABLE t0(c0);
INSERT INTO t0 VALUES('0');
CREATE VIEW v0(c0) AS SELECT CAST(0 AS INT) FROM t0;
SELECT * FROM t0, v0 WHERE 0 >= t0.c0 AND t0.c0 = v0.c0; -- unexpected: fetches row
</pre>
Unexpectedly, the query fetches a row. When removing the AND and its right expression, no row is fetched:
<pre>
SELECT * FROM t0, v0 WHERE 0 >= t0.c0; -- fetches no row
</pre>
Also the following expression evaluates to FALSE:
<pre>
SELECT 0 >= t0.c0 AND t0.c0 = v0.c0 FROM t0, v0; -- 0
</pre>
|