drh
0e464b5f51
Do not allow the push-down optimization on the right table of a RIGHT JOIN.
...
FossilOrigin-Name: 05917bfa02a7b6678c147d10fb53f55532ab15fd5d82d925ae921ae3759f0115
2022-04-25 20:47:58 +00:00
drh
5eb6e09795
The pushDownWhereTerms() routine should be using
...
sqlite3ExprIsTableConstraint(), not sqlite3ExprIsTableConstant(). This fixes
many problems, but still an error persists in join7.test.
FossilOrigin-Name: 10bf0e613809f71cc1a47ad40b517e2a66671212a6464e179c9d377e8b70d499
2022-04-25 20:38:42 +00:00
drh
a9cdb90421
Fix a problem with automatic indexes introduced by
...
check-in [664b461bb5063d980] and reported by
[forum:/forumpost/0d3200f4f3bcd3a3|forum post 0d3200f4f3bcd3a3].
FossilOrigin-Name: 7ca3456c00998a429418ff29cf251b381586b330b88344c94a40c5df0b71da85
2022-04-25 19:40:33 +00:00
drh
95fe38f2fc
Add a new optimizer disabling bit to disable just the UNION ALL branch of the
...
query flattener.
FossilOrigin-Name: c0f9ebab5455d8541a562122d3270b95ce571c3fd870b0048dda2b036c2b66c0
2022-04-25 14:59:59 +00:00
drh
7f417569f7
Avoid unintended side-effects on Parse.nSelect in the
...
sqlite3ViewGetColumnNames() routine.
FossilOrigin-Name: 59789fe1e745bb6f81898176e7e9c6064ac9f4bbefb4dc3c8f3e4c1379568f69
2022-04-25 14:49:48 +00:00
drh
1a6bac0d2f
Remove NEVER() on branches formerly thought to unreachable
...
(see check-in [71272caff5874137]) in order to fix the first bug reported
by [forum:/forumpost/28821db852|forum post 28821db852].
FossilOrigin-Name: bd6811d8110d5f00596e2eff6d4b02af8b6d8557d41990e6f50518ead0fa01fb
2022-04-25 10:43:19 +00:00
drh
ecb386b71f
Prevent the ORDER BY LIMIT optimization from running if the innermost loop
...
is a right-join, as doing so will get an incorrect answer.
FossilOrigin-Name: 3aefc874d31885c64a5e02868edb2aa56a2b4429252d494e67e4088a9298ce5b
2022-04-23 19:21:47 +00:00
drh
30d2aab5fd
In debug builds, add extra code to verify that there are no jumps that try to
...
escape from the right-join body subroutine.
FossilOrigin-Name: 45fe919266ba1843f3eeeb511ab43126069d4976c9fc64e57e0390c21f110b6e
2022-04-23 18:46:03 +00:00
drh
6c7e89b48a
Fix false-positives in sqlite3VdbeNoJumpsOutsideSubrtn(). All tests pass now.
...
FossilOrigin-Name: 1300d978d5a072780e0f16722e42461dc983de9b4dfb2f5a7023c74c92ab9bc8
2022-04-23 18:34:55 +00:00
drh
b77c312956
For debug builds, if the RIGHT JOIN body subroutine contains a jump that
...
escapes the subroutine, then abort the prepared statement with a descriptive
error and SQLITE_INTERNAL. This extra sanity check causes many tests to
fail.
FossilOrigin-Name: 2c5bb2bff26cc70d8cac78ddd12d5ac37ab1472f5f88afbd975950a18ac2804d
2022-04-23 18:04:31 +00:00
drh
d6bb6000ef
Make use of the "%!S" format when running ExplainSubquery.
...
FossilOrigin-Name: 9425d79cb407dedc259655625369e023d22a04ef7db606ea3eefe7e4d662be1a
2022-04-22 18:07:38 +00:00
drh
da653b897d
Improve EXPLAIN QUERY PLAN output and comments on bytecode listings by
...
distinguishing between "subquery" and "join" and using consistent names
across EQP and bytecode.
FossilOrigin-Name: a2d3ee92420ec564e31eb0005367cf7ff3d00bfaed5a98ffdbe17c91c95d9d97
2022-04-22 17:36:10 +00:00
drh
67f70bea06
Honor the MATERIALIZED keyword on a common table expression by not flattening
...
the CTE into an outer query.
FossilOrigin-Name: 8d631a6b9eb06b54b10eda595a4c588ca38f909b4afa653b24d1f720b55d72f7
2022-04-22 16:15:48 +00:00
dan
9b843f0ce0
Add test cases to check the handling of SQLITE_BUSY in rbu.
...
FossilOrigin-Name: 6fccc733c6041a2946fb3d37e4737ae37defae5c110225dd746cdc038cc64957
2022-04-22 15:18:41 +00:00
drh
1ca14b74ed
Simplification of data structures in the wildcard expander for
...
SF_NestedFrom queries.
FossilOrigin-Name: f7c18262347ff430879d5afc7a118d2b9b0050c845c6b1fe6c047062ea2ba8fe
2022-04-22 13:34:45 +00:00
drh
9c2d7aa7d0
Minor simplification to the result-set wildcard expander for SF_NestedFrom.
...
FossilOrigin-Name: d942530a6550a0cbe31790e462b0f0d57b9b4a896161878b7d45d11cbc1cb7a3
2022-04-22 12:46:46 +00:00
drh
8318b55d87
Merge the latest trunk fixes into the right-join branch.
...
FossilOrigin-Name: c74dc574c3b24a7d3533202f33b15341b043cfd89a80250563e6771ab6b6b8a7
2022-04-22 09:57:57 +00:00
drh
1c69bc912d
Previous fix to join8.test needs a return.
...
FossilOrigin-Name: 7b4cd705a0339ddacad19564b07e50e4f68f54bf14dd2cd5d59b39314a4d2523
2022-04-21 23:34:35 +00:00
drh
abb4e7598c
Disable join8.test if the build lacks support for virtual tables.
...
FossilOrigin-Name: 94e1916a2f594e6b8a54734027deb99688244d05cefb3c78f23afab49af1e08f
2022-04-21 23:01:24 +00:00
drh
11140addbb
Add support for RIGHT and FULL JOIN.
...
FossilOrigin-Name: f766dff012af0ea3c28a8ce4db850cd0205729a8283bce1e442992aded7c734b
2022-04-21 19:38:17 +00:00
drh
6dab33bf40
Fix harmless compiler warnings.
...
FossilOrigin-Name: 29255664127a975e5b0d5767cd4e56d93ff2ea1994702cdfbdca1b700952502e
2022-04-21 19:25:51 +00:00
drh
a74b4c4d45
Fix a harmless uninitialized variable warning in MSVC.
...
FossilOrigin-Name: b870d2a2fa54ddab6ffc9b9d95f52420a5a6831aeb73dac75355ca1ab15a190e
2022-04-21 19:20:38 +00:00
drh
7e9a56f70f
Fix harmless compiler warnings in the CLI.
...
FossilOrigin-Name: dfd2100bc4f316825fd199b347849d1a2b941837f9eedcf36f3c3d280692b991
2022-04-21 19:14:23 +00:00
drh
503ad9c72d
Make sure the code generator knows to invoke row-value subroutines which
...
running the right-join post-processing loop.
FossilOrigin-Name: fd328e52aee1dace12b1c2f44b6f7e9d15d8f77c8e9d9e3d85840a129a4b1808
2022-04-21 14:48:40 +00:00
drh
825a6bffc4
Ensure correct fg.isNestedFrom values even on crazy parses.
...
FossilOrigin-Name: e611e8e62c948d28cd3f28452d3096bab06998a685ed9434061cc2054f5cac32
2022-04-21 14:08:29 +00:00
drh
18f8600fe6
Avoid materializing columns of SF_NestedFrom subqueries that are never used.
...
Other code improvements manually imported from the right-join-paren branch.
FossilOrigin-Name: cd8272fc2a34d1b245fd95208b9b601266ee7d2ff0f5ce52d03752f2c4e852a2
2022-04-21 13:11:26 +00:00
larrybr
6403e77d3b
For CLI, fix how columnar mode fills in empty portions of wrapped row outputs.
...
FossilOrigin-Name: 77aed89192bdbad819ac17bf5d08728278a9b8cbbbef1d805df230caff79b417
2022-04-20 22:41:10 +00:00
drh
22b410d894
Small correction to the new bUsed logic of sqlite3ProcessJoin().
...
FossilOrigin-Name: ba04142e09bb1ccc86824760a2e11df47e070285a2d09c2f61b75255886597cd
2022-04-20 18:12:42 +00:00
drh
e60ffa3350
Merge window function fix from trunk.
...
FossilOrigin-Name: b6b9e185f8c44b5f2f51111f7c5e4e2d77c8b853c5be271467ce138e8066340c
2022-04-20 16:54:47 +00:00
drh
910e57b9df
Remove an unnecessary assignment operation.
...
FossilOrigin-Name: ed46527aca170ccbe9ed9ea4ae065db72c82dec17da7b99c928fae4495f05c2b
2022-04-20 16:53:23 +00:00
dan
41150bf35b
Fix a problem with using multiple SQLITE_SUBTYPE function as window functions in a single query.
...
FossilOrigin-Name: 9430ead7ba433cbfce99f4f364a0c08499230e3a04f167326b0f131f098ffa09
2022-04-20 16:42:57 +00:00
drh
bc656e220f
Comment fixes and improvements in sqlite3ProcessJoin().
...
FossilOrigin-Name: 1118655f4d58da1273e83954c80d8bc17fa3bde7a39e81cb9947d59894d5ab93
2022-04-20 16:26:22 +00:00
drh
815b782e99
Improved tracking of nested SELECT objects used to implement
...
parenthensized FROM terms.
FossilOrigin-Name: 0da2232624571f4020c05d775ea518514d748fba8dacd4caba2e2e6ed1ae399f
2022-04-20 15:07:39 +00:00
drh
b465a83353
Also show the ENAME_SPAN value in sqlite3TreeViewExprList(), if there is one.
...
FossilOrigin-Name: c1d42861778d65f7014c43fbaf09972a69ff0d81bfc2f4720160a989489cf2c8
2022-04-20 12:15:51 +00:00
drh
d4e9caf987
Improved TreeView output for ExprList: Show the ENAME_TAB value, if there
...
is one.
FossilOrigin-Name: eb3f883b45f1bf3f388823360f4aec2d4b8776bfd96185b4fb44b7bc95c62318
2022-04-20 12:14:20 +00:00
drh
2627cbd4b5
Add a new comment to the body of lookupName(). No code changes.
...
FossilOrigin-Name: 22fa9b9b450fbbf7578597714eb1094f7d7433ac13497dc7d4a9affc4a2652ad
2022-04-20 12:02:52 +00:00
drh
befbb40f44
Merge the ALTER TABLE fix from trunk.
...
FossilOrigin-Name: d5ceaef3fca8cb4791ead9cbfe00d0eafa1bdc2b0522c3599c68b40fe6a7efe2
2022-04-19 23:00:32 +00:00
dan
cbde37d8e4
Fix a problem in ALTER TABLE with handling "table.*" expressions within SELECT statements in triggers.
...
FossilOrigin-Name: 24755fd0657252e49793bb1fe906973a2dd84a1bde03bea9a762de36cc96c2d2
2022-04-19 20:47:18 +00:00
drh
4d0d071a53
Improved comment on the JF_LTORJ constant definition.
...
FossilOrigin-Name: e0744da95fc010dc3a2e030ff491bcfa08a18691ee6ebc7d4e8aab3850f56eec
2022-04-19 19:51:51 +00:00
drh
3117b7b081
Fix a NULL-pointer dereference that can occur on an aggregate query that
...
uses FULL JOIN. dbsqlfuzz 496a35dd4eefcd7935aaaeb0c69056bf49785d28.
FossilOrigin-Name: 63b8f8aec2a9ac3fbbd02715aa308eaf43c9ffde9d7c6db026d46edc575e7bdd
2022-04-19 18:23:01 +00:00
drh
e32d6a0bbf
Mark an unreachable "just-in-case" branch as unreachable.
...
FossilOrigin-Name: b966d52437f08a6759a83a45cafb0d706a8933a8e55dee38ae78166d1a5b3ba4
2022-04-19 15:56:03 +00:00
drh
de75638b33
Add 512 new join test cases derived from PostgreSQL output.
...
FossilOrigin-Name: 78d58e461f99366d2749ccd6d02ab4cba0cab20bb80c097e7128da1e50303549
2022-04-19 15:01:57 +00:00
drh
2e61588931
Remove unnecessary cases for the resolver.
...
FossilOrigin-Name: 5bc9aa68e2f938f6a70dd4b08703fe52416d17efe461ec65d37332b57b827fdd
2022-04-19 09:39:39 +00:00
drh
d737b16f92
Add the omitted "finish_test" to the end of joinA.test.
...
FossilOrigin-Name: 0907505cc9bb051280108fe5074211374b31836fae1ae6667a3de69f9d83fc01
2022-04-19 02:03:18 +00:00
drh
3b8c7545df
New test cases for RIGHT and FULL JOIN.
...
FossilOrigin-Name: 5c2f670e0fb35648e1d6e1c48f4d8af815cd57d59eac6ba22e253511bb078870
2022-04-19 00:24:52 +00:00
drh
1c2bf41a12
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
2022-04-18 23:20:02 +00:00
drh
ec39c96473
New test cases, including one that gets a different result than Postgres.
...
FossilOrigin-Name: 49ea11a4a5fd630db44f458304d4f45fa103529ed6b36d538c78074965e8d799
2022-04-18 22:51:24 +00:00
drh
f80bb195b3
Disable the unused EU4_EXPR mode for the IdList object.
...
FossilOrigin-Name: 5bcf4aa3bf6b1b9f47142bc37683bb3bf0adeffd052d07449af7c9b415add052
2022-04-18 19:48:31 +00:00
drh
7466d5665a
Even more test cases.
...
FossilOrigin-Name: 5f4310a104443ac3fc56f9d9cd2d428dd3e7a2a0285c8e74de6f499439fd6868
2022-04-18 19:34:41 +00:00
drh
23f240b325
New test cases for parenthesized NATURAL FULL JOINs.
...
FossilOrigin-Name: e34250efd34b526373bf072a43a7984ca19690836d7d2464dea8338066eaee8f
2022-04-18 19:28:08 +00:00