Unexpected execution error
(1) By Zhaokun Xiang (silva9988) on 2025-08-21 14:14:03 [source]
Dear SQLite Developers,
I meet an unexpected error. Please see the below cases. I can reproduce it on the version SQLite version 3.51.0 2025-08-20 23:29:59 and the latest Check-in [4e473cf0c2] of trunk. I would like to express my gratitude to your efforts in bug fixing and detailed analysis!
CREATE TABLE t0(c0 INT, c1 INT);
CREATE TABLE t1 (c0 INT);
CREATE VIEW v1(c0) AS SELECT t0.c0 FROM t0 NATURAL RIGHT JOIN t1;
CREATE VIEW v2(c0) AS SELECT 0 FROM v1;
INSERT INTO t0(c0, c1) VALUES (-1, 0);
INSERT INTO t1(c0) VALUES (NULL);
SELECT * FROM v1 INNER JOIN (v2 CROSS JOIN t0) ON (t0.c0 < t0.c1);
-- Parse error: ON clause references tables to its right
-- Expected Result: null,0,-1,0
(2) By Dan Kennedy (dan) on 2025-08-25 14:58:59 in reply to 1 [link] [source]
(3) By Zhaokun Xiang (silva9988) on 2025-08-25 15:09:00 in reply to 2 [link] [source]
Thanks for your fixing!
(4) By ddevienne on 2025-08-25 16:04:50 in reply to 2 [link] [source]
Hi Dan. FYI, typo. into into below:
/* If the SELECT statement contains ON clauses that were moved into
** into the WHERE clause, go through and verify that none of the terms