aboutsummaryrefslogtreecommitdiff
path: root/src/resolve.c
Commit message (Collapse)AuthorAge
...
* Fix the OSSFuzz-discovered shift problem from two days ago. This patch wasdrh2021-02-06
| | | | | | omitted from [078dbff04a95a001] apparently because I made the edit to "sqlite3.c" rather than "resolve.c" where it belongs. FossilOrigin-Name: 864772ffec4e91d8d73f9b97e6e1d7bd4e0537de19d11d30aed7eedd5b7d394a
* Remove unreachable code. Fix a shift UB problem introduced yesterdaydrh2021-02-05
| | | | | and discovered by OSSFuzz. FossilOrigin-Name: 078dbff04a95a001bbd8690ab08038fbb5506899df8290991b53fd1122a4c30c
* Snapshot. New design appears to work on a simple test case.drh2021-02-04
| | | FossilOrigin-Name: 8a65fbeecf3597e30853c5f0ccd9b8b46c508854fa521e58e0db279deebca7d4
* Add an ALWAYS() to an unreachable branch.drh2021-01-30
| | | FossilOrigin-Name: 6bb6de42b62acd35ade6c95a11bb4c9b35e7e9a24620731ae36364c4d5c3bc31
* Working prototype.drh2021-01-29
| | | FossilOrigin-Name: b7ef4dc21f187ff4ff679e823782535188c3814aa6ce720b3a01c6d3ba4ef9f5
* Use NEVER and ALWAYS macros to confirm that the return value fromdrh2020-11-08
| | | | | sqlite3ExprSkipCollateAndLikely() is never NULL in some of its use cases. FossilOrigin-Name: 76d2eb86e109fc3cbdba2e8175c22ed7660b59bb9315f6c55c565587f33ad43b
* Correctly handle expressions like "x IS (not) true/false" within the rhs of ↵dan2020-08-24
| | | | | IN() expressions. Fix for [f3ff1472]. FossilOrigin-Name: 493a25949b9a6d0be82169b597133e491d8be4f4147b6eae135b06c1d810abd3
* Fix harmless compiler warnings that surface in newer versions of GCC.drh2020-08-10
| | | FossilOrigin-Name: 9d670a318381f219b467653f5f9539097808b887ae37291ce13be462dedfb18d
* Fix problems that could occur if a table with the same name as the table ↵dan2020-07-15
| | | | | being updated appeared in the FROM clause of an UPDATE statement. FossilOrigin-Name: 13224cbd75990615088f3e30ccba05d31b3099fae4300c9ab8f7663bc5f0eb6f
* Add test cases and fixes for UPDATE...FROM statements that modify primary ↵dan2020-07-13
| | | | | key columns. FossilOrigin-Name: 47c87af3e52bce10fbcc2cbe832d659b0c204bfb3368d9314fa1b01120129254
* Merge latest trunk changes with this branch.dan2020-07-13
|\ | | | | FossilOrigin-Name: 5ee3c27e20d12a126fb773b428bb864102b949a5b26a8d5c523753dcedf4be10
| * Fix generated columns so that they play well with upsert.drh2020-06-29
| | | | | | | | | | | | See the [https://sqlite.org/forum/forumpost/73b9a8ccfb|forum post] by "iffycan" for details. FossilOrigin-Name: fa9d93cf32fac4b86044acf5d1b9ea2f36e964ed7142cf1d270986c9ef3fb766
| * Change the magic number used to identify the "excluded" pseudo-table indrh2020-06-29
| | | | | | | | | | an UPSERT statement into a #define constant. FossilOrigin-Name: e96c2ac9ab1a1c51b1498f4b91fb71d2987c30579d072b2f0297da9eb945cb97
| * When rewriting a query for window functions, if the rewrite changes thedrh2020-05-24
| | | | | | | | | | | | depth of TK_AGG_FUNCTION nodes, be sure to adjust the Expr.op2 field appropriately. Fix for ticket [7a5279a25c57adf1] FossilOrigin-Name: ad7bb70af9bb68d192137188bb2528f1e9e43ad164c925174ca1dafc9e1f5339
* | Fix problems with using LIMIT and FROM clauses as part of single UPDATE ↵dan2020-04-29
|/ | | | | statement. FossilOrigin-Name: b717dc3c5fafb9b86a141e7ecffc030fd9b36aa57a0b3e5200d64ad23a0aa13d
* Performance improvement in sqlite3ResolveExprNameList().drh2020-04-06
| | | FossilOrigin-Name: 7e170e67f24c7cdef7e7ceac4e0b81a75382618e4abe9e604f3d7f6db9dc6396
* Performance improvement for column name lookup.drh2020-04-06
| | | FossilOrigin-Name: 1e4b6a93987cdfbf829e2ff35ef417c290625f2894ad11949e301af518f1fb44
* Remove a NEVER() that could be true in sqlite3MatchEName().drh2020-04-04
| | | FossilOrigin-Name: 921448f0e24a3753374b32be9d7bf36a9ca5d8522eff9f0b51dc243f08652419
* Do not suppress errors when resolving references in an ORDER BY clause ↵dan2020-04-03
| | | | | belonging to a compound SELECT within a view or trigger within ALTER TABLE. Fix for ticket [a10a14e9b4ba2]. FossilOrigin-Name: 684293882c302600e112cf52553c19d84fdb31663d96e5dd7f8ac17dda00a026
* Fix to the recomputation of the colUsed field added by check-indrh2020-03-21
| | | | | [a9bb71ba708ba722]. This fixes ticket [5829597ac43811e3]. FossilOrigin-Name: 5d14a1c4f2fc17de98ad685ad1422cdfda89dfccb00afcaf32ee416b6f84f525
* Consolidate some code on this branch.dan2020-03-21
| | | FossilOrigin-Name: a85c63daa640e02fdfd891a05a1a09e848c9621a5dd6e112338451008623ecbb
* Allow "main" to be used to refer to the main database even after ↵dan2020-03-20
| | | | | SQLITE_DBCONFIG_MAINDBNAME has been used to assign another alias. FossilOrigin-Name: 75c85ca32f9ae4a28fd8f8ff2f7639599413d22af706e9799a0e76cc560d14eb
* Fix a potential NULL pointer dereference following OOM. Problem discovereddrh2020-02-19
| | | | | by dbsqlfuzz. Test case in TH3. FossilOrigin-Name: 5aeb5a2d295e10d5fc1d456b3acaf8ac13c04cb5bb71a8c4571541d366e95887
* Allow non-deterministic function in CHECK constraints. It turns out thatdrh2020-01-18
| | | | | | PostgreSQL, MySQL, and SQLServer all allow this. We should be the the exception. Ticket [830277d9db6c3ba1] FossilOrigin-Name: 8c8ce526adb60b8061e55151599ca8b11f1ec2e968d3bacc73a2a249e9e95ee1
* Fix a problem that restricted edgy functions in TEMP tables.drh2020-01-09
| | | | | New test cases added. FossilOrigin-Name: 8878c40753566a8c4ccd1d413019cabde7569b947f730527d13bfc3db384e97d
* Performance improvements and test cases added. Allow "PRAGMA trusted_schema=ON"drh2020-01-08
| | | FossilOrigin-Name: 30882ca80f6c51f6bb7b2692c1ac3f19a7c61a23aa8730be79aec0ae3ef08d54
* Check for whether or not it is safe to use non-innocuous functions as thedrh2020-01-08
| | | | | function is being coded, not when its name is resolved. FossilOrigin-Name: 1da802d54b689a462e1fe899c6ffa08ef14d34f36728b14b055b5a76b1edc274
* Invert the UNTRUSTED_SCHEMA setting to be TRUSTED_SCHEMA.drh2020-01-07
| | | FossilOrigin-Name: f5fcf1fbc6473f8e91315b14d67745f2748010641b7463d1f4ca51e6fdf97462
* Refactor names of flags for improved legibility.drh2020-01-06
| | | FossilOrigin-Name: 411e8ec2219bb4181aaf2209fb1e7baf5e8df8b8c8adb82a69b48cf7e8e7e7d4
* Refactor the names of the new controls for restricting what actions the schemadrh2020-01-04
| | | | | can take behind the application's back. FossilOrigin-Name: 65d7d39a858c51ffd781f5a6335e029895e597aeb1e1ccdadea8ce79c8ad412f
* Invert the SQLITE_FUNC_SAFE bit to be SQLITE_FUNC_UNSAFE. The externaldrh2020-01-03
| | | | | | bit is still SQLITE_INNOCUOUS. It gets inverted as the appdef function is registered. FossilOrigin-Name: 1c266cb3be46d26e640752a99979acb1a1809361ba70ca3fca981c42383c360e
* When UNSAFE_IN_VIEW is disabled, only allow functions in views that aredrh2020-01-03
| | | | | tagged with SQLITE_INNOCUOUS. FossilOrigin-Name: 9ee79b254e4c51a2a41f7ed49ad389d8d7105e649483adb79772052fa0ade3c0
* Merge fixes from trunk.drh2020-01-03
|\ | | | | FossilOrigin-Name: 002406df22995880d002be2e4cebb4d560283d4e0d7a4b5a34edcb110802b543
| * Fix a possible NULL pointer dereference caused by using a "VALUES(...)" as a ↵dan2020-01-03
| | | | | | | | | | component of a compound SELECT with non-integer ORDER BY clause terms. FossilOrigin-Name: 9d791116420f4e3f613775569e0a0cba2fc22da568b2fb2df920bcf9c9002938
* | Merge enhancements from trunk.drh2020-01-02
|\| | | | | FossilOrigin-Name: 091403a6705f5f1352c76eacbfdca75fe0bab12ab9b156842641de07c38d3f66
| * NEVER() and ALWAYS() macros tagging unreachable branches.drh2020-01-02
| | | | | | FossilOrigin-Name: 34b877742ef78e9bb3f16815180f4ad9cd722beb1d610f713400a3b25d68aa9b
| * Merge the latest enhancements from trunk.drh2020-01-02
| |\ | | | | | | FossilOrigin-Name: bd57e6d923d3b04f0a07aaf18bf389d2b2b7efc7c57e8cb37e6ef910662d8397
| | * New test-only SQL functions: implies_nonnull_row(), expr_compare(), anddrh2020-01-01
| | | | | | | | | | | | | | | | | | | | | expr_implies_expr(). The SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test-control is modified to toggle internal function access on and off for a single database connection. FossilOrigin-Name: 473892a8eceacf24d57fd0c72ff2a0b8be4e0d75e0af7a30bdb24fbc3b453601
| * | Merge recent enhancements from trunk.drh2019-12-31
| |\| | | | | | | FossilOrigin-Name: 39d55579376906f212271ce9b2d367e3ad029fb173f22c7253312b467970208a
| * | Merge fixes from trunk.drh2019-12-13
| |\ \ | | | | | | | | FossilOrigin-Name: 9c471195f6d3e4b00e2d0f909b306a4036352082dca5f016a8eece226e82163d
| * | | Tie up the loose ends in the ExprList size reduction.drh2019-12-13
| | | | | | | | | | | | FossilOrigin-Name: 59d0f3afe5249a2a6453fe7bc810c2c7beb896d3800174c7c90f9304c0b1ad88
| * | | Work toward reducing the incremental size of an ExprList object to 24-bytedrh2019-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | per entry, from 32-bytes (on a 64-bit machine). This helps the new mini-lookaside allocator to run better by avoiding excessive reallocs. The current change mostly works, but still has a few loose ends to tie up. This check-in is merely a snapshot to save my work. FossilOrigin-Name: fdda76cfb01bf2b19522ac4558b443634d28a69b0828677c42682b645eae1f3b
| * | | Change the name of the Expr.a.zName field to zEName, so that it has a namedrh2019-12-12
| | | | | | | | | | | | | | | | | | | | | | | | that is distinct from other fields and variables and is hence easier to grep for. FossilOrigin-Name: d3783357f8fa76c42a86f12b214522f0388c37773c36ab8c5ce0623abbc4436a
* | | | Experimental branch with new sqlite3_db_config() options that could possibledrh2019-12-31
| |_|/ |/| | | | | | | | | | | | | | enhance security for applications reading potentially compromised database files. FossilOrigin-Name: 96a2db2612f2e47bbec0e374a242820c88f03c42ccbf8467abccaef41469bae2
* | | Fix a problem involving window function aliases being referenced from ↵dan2019-12-27
| |/ |/| | | | | | | sub-selects. FossilOrigin-Name: e3b5fc05c00fc58be7a7c94ce1d97a5b05113f39aba03df64aab08364f85616b
* | Ensure that there is a containing SELECT statement when processing adrh2019-12-13
|/ | | | | normal aggregate function as if it were a window function. FossilOrigin-Name: c1014e80b26131200a115beb86929a8f0ded2dd65b075e47373346c0f170576a
* Factor out the conditional (which is only true for rare errors) from thedrh2019-12-12
| | | | | | | | notValid() function in resolve.c, for a performance improvement and size reduction. Also cause failures to set the Expr node to a NULL operator so that it does not cause problems later in case PRAGMA writable_schema=ON has been set. Test cases in TH3. FossilOrigin-Name: c6af9f655b73200ecc0c4189698e421af6ca584babdc76e73a36d468b2eea1f9
* Rename a local variable to avoid masking a function parameter and thusdrh2019-12-09
| | | | | causing a harmless compiler warning. FossilOrigin-Name: f065cf003bd2a3a580cb5b9fa2eacd8be075fe8c2bbc5688e9a9406abbfb3804
* The previous check-in was not quite correct, and introduced a new problemdrh2019-12-09
| | | | | with the USING clause. Use this version instead. FossilOrigin-Name: ed28aaa4851202111a502f883ca06359d89b25bba4055c29d7bce2b501cfcc68
* Ensure that the SrcList_item.colUsed field is set correctly (set to have adrh2019-12-09
| | | | | | 1 for all columns of the table) when a generated column appears in the USING clause of a join. FossilOrigin-Name: 1923efb283e8840fa7436eb20b9d2174ef7cace1690d3b97b572a0db2048b8e3