Unexpected left join result
(1) By Zhaokun Xiang (silva9988) on 2025-07-11 16:29:35 [source]
Dear SQLite Developers,
I meet a wrong left join result. Please see the below cases. I can reproduce it on the version SQLite version 3.51.0 2025-07-11 14:18:19 and the latest Check-in [a5369e67f7]. I would like to express my gratitude to your efforts in bug fixing and detailed analysis!
CREATE VIRTUAL TABLE t0 USING fts5(c0, c1);
INSERT INTO t0(c0,c1) VALUES (1,0);
SELECT * FROM t0 LEFT JOIN ( SELECT 0 AS col_0 ) ON ((((t0.c1 MATCH '1')AND(CASE WHEN t0.c0 THEN CAST(t0.c1 AS INTEGER) ELSE 1 END))));
-- Wrong Execution Result:
-- Expected Result: 1,0,NULL
(2) By Zhaokun Xiang (silva9988) on 2025-07-14 05:54:01 in reply to 1 [link] [source]
Dear developers,
I see you are fixing it on the check-in 18ba07c152. Here I want to express my gratitude to your efforts in fixing! Thanks for your fixing!