mirror of
https://github.com/sqlite/sqlite.git
synced 2026-10-23 21:49:02 +03:00
Fix a problem in the query flattener associated with RIGHT JOIN, as
reported by [bugs:/info/2026-10-11T16:49:00Z|Bug 2026-10-11T16:49:00Z]. This problem surfaced after the fix to [forum:/info/2025-08-21T14:14:03Z|Forum post 2025-08-21T14:14:03Z] at check-in [e0beda7ffe92abf6]. Before that, the query would not parse. FossilOrigin-Name: e6e27e37eb8c3159d67529959694971f35a589da75648e207c44e317e6d160be
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# 2022 May 17
|
||||
# 2025-08-22
|
||||
#
|
||||
# The author disclaims copyright to this source code. In place of
|
||||
# a legal notice, here is a blessing:
|
||||
@@ -286,4 +286,17 @@ do_execsql_test 9.4 {
|
||||
WHERE t1.b IS NULL;
|
||||
}
|
||||
|
||||
# Bug 2026-10-11T16:49:00Z
|
||||
db null NULL
|
||||
do_execsql_test 10.0 {
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES(1);
|
||||
SELECT x.a AS xa, y.a AS yz, z.a AS za, va
|
||||
FROM t1 AS x JOIN t1 AS y ON x.a+y.a=0
|
||||
RIGHT JOIN t1 AS z ON z.a+y.a=0
|
||||
CROSS JOIN (SELECT 2 AS va FROM t1 UNION ALL SELECT 3 FROM t1)
|
||||
ORDER BY +va;
|
||||
} {NULL NULL 1 2 NULL NULL 1 3}
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user