aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Add support for RIGHT and FULL OUTER JOINs.drh2022-04-13
|\ | | | | FossilOrigin-Name: fa9d206f904280e3eafc6f4ba6c0c7325948364c62eeeb9f0fdc5825d622ec35
| * The rows of a RIGHT JOIN might come out in any arbitrary order. So disabledrh2022-04-13
| | | | | | | | | | the ORDER-BY/GROUP-BY optimizations if a RIGHT JOIN is involved. FossilOrigin-Name: d168f245ecf497368feea4697769930c00420ef47a584904dac85371b61fb78a
| * Add missing VdbeCoverage() macros on new branch byte-code opcodes.drh2022-04-13
| | | | | | FossilOrigin-Name: 218c7167e562f5c327124f02a92de85079315320a221fb0508310d927596b14c
| * Ensure that the JT_LTORJ bit in the SrcItem.fg.jointype is preserved duringdrh2022-04-12
| | | | | | | | | | query flattening. FossilOrigin-Name: 61259050152321bc57dbdfdc3edcabb4f18c021b1ee0491c1e04ae24c7a59d89
| * For the bad join type error message "unknown or unsupported join type"drh2022-04-12
| | | | | | | | | | | | remove the "or unsupported" clause, because we now support all valid join types. FossilOrigin-Name: ab0a0562dd3594cf50ee56f6b3a5847fa5dcadf69146d560e3e7a95651b8f405
| * Factor out the RIGHT JOIN non-matched row loop from sqlite3WhereEnd(). Thisdrh2022-04-12
| | | | | | | | | | | | reduces the register pressure on that routine and helps it to run faster in the common case where there is no RIGHT JOIN. FossilOrigin-Name: beeecf1604d4fb11e45058f48cb2289c6542e0bc218d63a245198113d8d5476b
| * Merge the latest enhancements from trunk into the right-join branch.drh2022-04-12
| |\ | | | | | | FossilOrigin-Name: b3e57ba120067c79e0398e39da9f00ecb11a5e18c36479da4c36a39e88a78a27
| * | The multi-index OR optimization does not work for RIGHT join, so disallow it.drh2022-04-12
| | | | | | | | | FossilOrigin-Name: 34c2f7b237fa4e0e1cd94fb9c44ebe194b86b88dc575055cc46c7f3695d02756
| * | Always explicitly set each table cursor to NullRow before doing the RIGHT-JOINdrh2022-04-12
| | | | | | | | | | | | | | | | | | unmatched row pass. This is a cheap opcode, and it adds an extra layer of defense against incorrect results. FossilOrigin-Name: a3d14e61ca22167296fee125a3e9aa63413408955e03bb3f9d85fa9f22df1b79
| * | Fix RIGHT JOIN for virtual tables.drh2022-04-11
| | | | | | | | | FossilOrigin-Name: 75a9116e98b9ac5c1a4c62a01143a016d9ba6a0b495ff7af7468c11947a3e888
| * | The query flattener must add TK_IF_NULL_ROW opcodes on substituted valuesdrh2022-04-11
| | | | | | | | | | | | | | | | | | that land on the left operand of a RIGHT JOIN, just as it already does for the right operand of a LEFT JOIN. FossilOrigin-Name: 8e02cdf5b1128f5e5b82d93903063415ec312694e5ccdd19e99fa35433f1b68a
| * | Fix handling of "continue" and "break" from inside the loop for the rightdrh2022-04-11
| | | | | | | | | | | | | | | operand of a RIGHT JOIN. FossilOrigin-Name: b6e773a26c2c6ee76ea61acb059b4e676d07ea62f6db9c513638f8986557cf04
| * | Do not attempt the LEFT JOIN strength reduction optimization on a FULL JOIN.drh2022-04-11
| | | | | | | | | FossilOrigin-Name: 7ef3e99a73d70405a185d5d31f2d97d3bd99568fd6f10941e75d6c0baa27dc4f
| * | Show LEFT and RIGHT JOIN processing in the EXPLAIN QUERY PLAN output.drh2022-04-11
| | | | | | | | | FossilOrigin-Name: d91faeffea5cf0585fb71e5311fdcc6b8be85c7e9c732050b4448e617c970101
| * | Make a distinction between (1) WHERE clause constraints, (2) ON/USINGdrh2022-04-11
| | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Fix some comments that refer to LEFT JOIN that should refer to OUTER JOIN.drh2022-04-11
| | | | | | | | | | | | | | | No changes to code. FossilOrigin-Name: 5be5ede5cca1cd5ef863fe0feb2b4a990f4a42865281a6c2e4eb816f48847dc6
| * | Merge the Expr.w.iJoin name change from trunk into the right-join branch.drh2022-04-11
| |\ \ | | | | | | | | FossilOrigin-Name: 29927926eb32acd963e2c496ad67d55177615ec4150fd218afaf2f9a730cabec
| * | | Ensure that the JT_LTORJ flag is preserved when flattening a subquery thatdrh2022-04-11
| | | | | | | | | | | | | | | | | | | | is on the left side of a RIGHT JOIN. FossilOrigin-Name: ccb61fb1f30e2741b19c1a0cbd2951715224852c86234a3c6a4bbd2e1187634a
| * | | Show the JT_LTORJ flag in TreeView debugging output.drh2022-04-11
| | | | | | | | | | | | FossilOrigin-Name: 21eb44919f38abad30b75181ca8aec38b453b94dba2815caf7e946e07faa40d7
| * | | Do not allow query flattening nor the push-down optimization on thedrh2022-04-11
| | | | | | | | | | | | | | | | | | | | right operand of a RIGHT JOIN. FossilOrigin-Name: 5aa0c9ea9cf53c13bf266278b479b2e7af3aa5c6b144bd49ff155a4eb3c23c96
| * | | Cannot use an automatic index on the right table of a RIGHT JOIN becausedrh2022-04-10
| | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Revisit [f84b2beca7197589]: disallow co-routine implementations of tablesdrh2022-04-10
| | | | | | | | | | | | | | | | | | | | that are to the left of a RIGHT JOIN, to avoid other complications. FossilOrigin-Name: cf00ebfc4b77f45ec466b0d57d7c22c7f48acab19e4e55b168eb4b53f390d887
| * | | Minor improvements to the sqlite3SrcListShiftJoinType() routine. This starteddrh2022-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | out to be an effort to convert RIGHT JOIN to LEFT JOIN if the join was on the first pair of relations, but that messes up the "*" expansion and so won't work. FossilOrigin-Name: a48902c71ed30c83de7dbd26d1c7956136c35dc53b1076bc8b1ebcba568a3fd3
| * | | When the left-most table of a RIGHT JOIN is implemented as a co-routine, drh2022-04-10
| | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | More test cases and bug fixes.drh2022-04-10
| | | | | | | | | | | | FossilOrigin-Name: 140e97fde94fdc3babdd456ce1b22900ead0e40e2afe63d89d21ccdbf141b607
| * | | More RIGHT JOIN test cases and a bug fix.drh2022-04-10
| | | | | | | | | | | | FossilOrigin-Name: 19e8ad690a140ca40838bf31a377c19010fcbbc2554a4f1746737543043e334b
| * | | Bug fixes. A basic FULL OUTER JOIN now works.drh2022-04-09
| | | | | | | | | | | | FossilOrigin-Name: 34bbeeb77bd530b2b1f0390e9e552f65ae35f09a74d80a09dd327e64f9be51a1
| * | | Add byte-code that computes unmatched rows on the right table of a RIGHT JOIN.drh2022-04-09
| | | | | | | | | | | | | | | | | | | | | | | | Compiles, and the code looks semi-reasonable, but still does not run. Incremental check-in. FossilOrigin-Name: 2db5a498e74241dd19ef51c601f1a2b3b687faed3e1be2d1e3ada737406ac8e9
| * | | The interior of the RIGHT JOIN loop is now a subroutine.drh2022-04-09
| | | | | | | | | | | | FossilOrigin-Name: 549f5a7ee639de80f049445002f58e93c805f9a3d3db1987ec9d139ccef4805e
| * | | A few bits and bobs of code generation toward getting RIGHT JOIN to work.drh2022-04-09
| | | | | | | | | | | | | | | | | | | | Much more remains to do. FossilOrigin-Name: 55b4543122646997d928598343bc467c993f971e86e9037c85430cc948750576
| * | | Merge the sqlite3WhereMalloc() routine from trunk into the right-join branch.drh2022-04-09
| |\ \ \ | | | | | | | | | | FossilOrigin-Name: b1b3845aa38f469a27f07c8f6e8a98334f7967b19661ee4cf155d6997afd9d4c
| * | | | Preliminary code to support RIGHT JOIN. Everything seems to work, except thatdrh2022-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the code to compute the unmatched rows for the RIGHT JOIN has not yet been added, so the result of a RIGHT JOIN is currently the same as an INNER JOIN. FossilOrigin-Name: 415abd6731b8e8a605adabfa6066c8a852a8531c300df41325d5f7e75cae5a70
* | | | | Fix an assert() in btree.c that might not be true for a corrupt database file.drh2022-04-13
| |_|_|/ |/| | | | | | | FossilOrigin-Name: dbd8e2e46cfb2de0ebdbb62cda2fe669df3eda98f5d6112d541f581995b1361d
* | | | Earlier detection of corruption in balance_nonroot(). dbsqlfuzz ↵dan2022-04-12
| | | | | | | | | | | | | | | | | | | | 9191ade77ebd3b7a3356e074957aa85b0c669d14. FossilOrigin-Name: bff4f083eb1c35544988493a5d73a42e646c4250b841f5aae38c2183f0867a0e
* | | | Modify utility function sqlite3SetString() so that it may be used safely on ↵dan2022-04-12
| |_|/ |/| | | | | | | | | | | Parse.zErrMsg. Fuzzer test case "crash-1604e5d76c92574e21e437049dab9b672e06b767.txt". FossilOrigin-Name: 09c5a4ec13b02efd6207e26dab7beaf184f0d8ccea0bd0dfe94fc803fe5636ce
* | | Rename the Expr.w.iRightJoinTable to just Expr.w.iJoin, so that the wordsdrh2022-04-11
| | | | | | | | | | | | | | | | | | "RightJoin" in the former name do not lead readers to believe that this has something to do with RIGHT JOINs in particular. FossilOrigin-Name: e8c00442d2daedec079748d13147bf73b0ec3c3cf432bce2cdccb706bdff2853
* | | Fix .import bug reported at ↵larrybr2022-04-09
| |/ |/| | | | | | | https://sqlite.org/forum/forumpost/14db09d7e765b819 . zAutoColumn made to deliver characters, not bytes. FossilOrigin-Name: 21e96600d90c1cda84777abe22a11058eba46c9faefeb05f8c31bc0e7fa84b19
* | The sqlite3WhereMalloc() routine allocates memory that is automaticallydrh2022-04-09
|/ | | | | deleted when the corresponding WhereInfo object is destroyed. FossilOrigin-Name: f237e1d8cc41b937f34288daebfacf5f7b0990a807a805e0cb6b45bc730192d6
* Enhance the sqlite_dbpage fix at [/info/642a0b4752743216|check-in 642a0b4752743]drh2022-04-08
| | | | | | | from about a month ago such that it still takes a transaction on all attached databases, but it only starts a read transaction for read-only operations, rather than starting a write transaction for everything. FossilOrigin-Name: 8efd61e8518594e3e9c84681fc35796a78fe8885a97ad4dd19f1573ee8065b18
* Improved explanation and commentary on the sqlite3JoinType() routine. Onedrh2022-04-08
| | | | | | of the error messages changes slightly, but besides that everything works the same. FossilOrigin-Name: 48f2e5a1fbaa8ceb32e08066766be74233b0c67ab430bbf7adfdff42cdb7b8ec
* Fix two unreachable branches introduced by the recentdrh2022-04-07
| | | | | sqlite3TriggersExist() optimization. FossilOrigin-Name: 1b5475d212cf9de0bff69eee8c607b4fcd8e04bf4df72171429e7609c4153951
* Enhance the EXPLAIN output formatting in the CLI so that the subroutine thatdrh2022-04-07
| | | | | implements the loop body for the multi-index OR optimization is indented. FossilOrigin-Name: c2965fea9df7076b235d3eadaf84f0a36242476d0329030b0e57557b66e2540c
* The ".testctrl optimizations 0x400000" command disables the generation ofdrh2022-04-07
| | | | | | | | | OP_ReleaseReg opcodes. OP_ReleaseReg opcodes are usually only generated for SQLITE_DEBUG builds and are used to verify that registers are descoped propertly. But they can get in the way of code understanding when studying bytecode dumps. So this new optimization setting is provided to temporarily turn OP_ReleaseReg opcodes off. FossilOrigin-Name: fa5276725f246cef9d58b27c1e617ee3f873f7a9b88284a4e8fc453ebda338bc
* Optimization to sqlite3TriggersExist() saves over 700K CPU cycles.drh2022-04-07
| | | FossilOrigin-Name: 5043a3507e0781878e0e1bea5095a33273958820baead4af8fc2929e9d7c07ee
* Avoid compiler warnings about the new sqlite3Show() debugging routinesdrh2022-04-07
| | | | | begin "defined but not used". FossilOrigin-Name: 47ddc26974fbad8233c953d435e79d4f5dd5e09fbd684ea5f4ad32f4cae6cae6
* Omit an unnecessary initialization in tokenExpr().drh2022-04-07
| | | FossilOrigin-Name: 8f6ae686019c61a03fe70eb78d2b529b1cf126215b45513a97cfdf7086f82f54
* Fix harmless compiler warnings.drh2022-04-07
| | | FossilOrigin-Name: 61095b5bcb5c30d29f03efa5b4809e3a0b780ed57e35227c292aab9dd1cfe3f6
* Improved technique for parsing the ON and USING clauses of a join is fasterdrh2022-04-07
| | | | | and uses less memory. FossilOrigin-Name: 158156a3e3d50042cafc75dea3aaaa68b1f2efb9c3d178518ea6e68e32e0d21c
* Faster parsing of the FROM clause in joins for the common case where theredrh2022-04-06
| | | | | is no INDEXED BY clause. FossilOrigin-Name: 848b7a0ea99ddc52091b78313f018c07d00a0e28aa6da8c1cae709c1d03468fe
* Improvements to the display of AST for DML statements.drh2022-04-06
| | | FossilOrigin-Name: 84c239a071cfaf8af107646f01ef269e2915fd2384e95927d484f2e408ba6bbf