mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix the query flattener so that it does not flatten a RIGHT or FULL JOIN into
any position of the outer query other than the first. FossilOrigin-Name: 837322aa95b1c46201b7dd0c2e6c7b9915b4276d997949f1ecf961fb7f3514cf
This commit is contained in:
@ -518,6 +518,7 @@ foreach {id schema} {
|
||||
- - 8 dave - -
|
||||
}
|
||||
|
||||
# Restriction (27) in the query flattener
|
||||
# Verified by PG-14
|
||||
do_execsql_test join9-$id.1000 {
|
||||
WITH t56(id,y,z) AS (SELECT * FROM t5 FULL JOIN t6 USING(id) LIMIT 50)
|
||||
@ -538,5 +539,27 @@ foreach {id schema} {
|
||||
4 bob green 444
|
||||
}
|
||||
|
||||
# Verified by PG-14
|
||||
do_execsql_test join9-$id.1020 {
|
||||
SELECT id,x,y,z
|
||||
FROM t4 FULL JOIN t5 USING(id) INNER JOIN t6 USING(id)
|
||||
ORDER BY 1;
|
||||
} {
|
||||
3 - yellow 333
|
||||
4 bob green 444
|
||||
5 - blue 555
|
||||
}
|
||||
|
||||
# Verified by PG-14
|
||||
do_execsql_test join9-$id.1030 {
|
||||
WITH t45(id,x,y) AS (SELECT * FROM t4 FULL JOIN t5 USING(id) LIMIT 50)
|
||||
SELECT id,x,y,z FROM t45 JOIN t6 USING(id)
|
||||
ORDER BY 1;
|
||||
} {
|
||||
3 - yellow 333
|
||||
4 bob green 444
|
||||
5 - blue 555
|
||||
}
|
||||
|
||||
}
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user