Commit Graph

10 Commits

Author SHA1 Message Date
drh
ff02ac7f07 Do not attempt the LEFT JOIN strength reduction optimization on a FULL JOIN.
FossilOrigin-Name: 7ef3e99a73d70405a185d5d31f2d97d3bd99568fd6f10941e75d6c0baa27dc4f
2022-04-11 14:43:11 +00:00
drh
37259f4e6b New test cases.
FossilOrigin-Name: d5f6791b86f946b348f5ddc9cedc0df4a86b17854a97554140799caf74c602f3
2022-04-11 13:13:57 +00:00
drh
3a6e4c59c4 Make a distinction between (1) WHERE clause constraints, (2) ON/USING
constraints on outer joins, and (3) ON/USING clause constraints on inner
joins.  Formerly, there was no distinctionb between 1 and 3, but RIGHT JOIN
needs to know the difference.  Make RIGHT JOIN aware of this difference and
add test cases.

FossilOrigin-Name: 0f6f61c3664cc87209c2a6f9b6df3a750d1510723fcde209c33db8feaf48bcf3
2022-04-11 12:38:06 +00:00
drh
41798d5bbc Do not allow query flattening nor the push-down optimization on the
right operand of a RIGHT JOIN.

FossilOrigin-Name: 5aa0c9ea9cf53c13bf266278b479b2e7af3aa5c6b144bd49ff155a4eb3c23c96
2022-04-11 00:21:53 +00:00
drh
529394e5c1 Cannot use an automatic index on the right table of a RIGHT JOIN because
automatic indexes must be WHERE_IDX_ONLY, but the RIGHT JOIN post-processing
does not know how to work with an index-only scan.

FossilOrigin-Name: beb4401dc09fb68e85ddcf3f99598527691535d0eb7693168f440e5a5a076e3f
2022-04-10 23:48:47 +00:00
drh
9debb58e48 Revisit [f84b2beca7197589]: disallow co-routine implementations of tables
that are to the left of a RIGHT JOIN, to avoid other complications.

FossilOrigin-Name: cf00ebfc4b77f45ec466b0d57d7c22c7f48acab19e4e55b168eb4b53f390d887
2022-04-10 23:01:20 +00:00
drh
fcde633f7c When the left-most table of a RIGHT JOIN is implemented as a co-routine,
make sure all its columns are flushed to NULL when it finishes so that
they appear to be NULL during the RIGHT JOIN post-processing.

FossilOrigin-Name: f84b2beca719758979d7a5a63c3d16d5121a7518b3fbe5039af474a83dd569c2
2022-04-10 19:51:22 +00:00
drh
e21e36dd2c More test cases and bug fixes.
FossilOrigin-Name: 140e97fde94fdc3babdd456ce1b22900ead0e40e2afe63d89d21ccdbf141b607
2022-04-10 17:14:48 +00:00
drh
a20c71e9e8 More RIGHT JOIN test cases and a bug fix.
FossilOrigin-Name: 19e8ad690a140ca40838bf31a377c19010fcbbc2554a4f1746737543043e334b
2022-04-10 16:13:37 +00:00
drh
ac8c438a79 Add a simple test case. (It is not difficult to create additional test
cases that assert, at this point.)

FossilOrigin-Name: f2201d5dcfc552bdddd0780b3f466bdaa886e557f147335c085395bfc001f6b0
2022-04-09 20:11:05 +00:00