aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
Commit message (Collapse)AuthorAge
...
* Remove redundant conditional from sqlite3ExprCanBeNull().drh2023-12-19
| | | FossilOrigin-Name: 257f96a2d22c605885fa66220c28cf7dc5941c330bccee3f132b9e7b70d89d30
* Add ALWAYS() and NEVER() on branches made unreachable by recent changes.drh2023-12-19
| | | FossilOrigin-Name: c50e6c2ace49d0928b05cbfd877c621e9a0f77dc4e056ccb1dbe5cf118a00d00
* Ignore COLLATE operators when determining whether the result of a subexpressiondrh2023-12-19
| | | | | should be shallow-copied or deep-copied. FossilOrigin-Name: 34ae36a45e814bed7c8340412c7ef3fc849b82357656d0eb5f0f805e59d846d0
* Extra ALWAYS() macros to verify state in the sqlite3ExprCanBeNull() routine.drh2023-12-19
| | | FossilOrigin-Name: be19b84c9f3fe127165809908add148dbe9a827a55608b0490de7e69b7f7f191
* Pass subtype information through the aggregate ORDER BY sorter fordrh2023-12-14
| | | | | aggregate functions that use subtype information. FossilOrigin-Name: 3536f4030eab6d650b7ed729d2f71eb6cc3b5fbe16b4e96b99008d66522aaccb
* Add ALWAYS() on branches added in [ec0ae4030968c782] that are always true.drh2023-12-07
| | | FossilOrigin-Name: 451cef8609e96dd9244818adc5c6f240544694bcb4ae620e88f90e403e59d70f
* Work around LLVM's newfound hatred of function pointer casts.drh2023-12-06
| | | | | [forum:/forumpost/1a7d257346636292|Forum post 1a7d257346636292]. FossilOrigin-Name: ec0ae4030968c782af48d1c776351c14b2ada21d40aeb97915f33df30706e18f
* Back out an incorrect change to the sqlite3ExprCompareSkip() function thatdrh2023-11-20
| | | | | | | was added way back on 2019-08-22 for [44578865fa7baf97|check-in 44578865fa7ba] and which was only today discovered to be incorrect by [forum:/forumpost/45ec3d9788|forum post 45ec3d9788]. FossilOrigin-Name: f5b3eb0fc8936ba274a7654ff6dfa7d4654bd8dbca7f3a5ec1134b0b5260d59d
* Add NEVER() to a branch made unreachable by [6f9eed826f5b3d1c].drh2023-11-14
| | | FossilOrigin-Name: 26dcaa34e3521783bde687749d590eca54cecb4bb95ef332a4a6473c4141d052
* Fix another obscure problem with nested aggregates. dbsqlfuzz 04408efc51.dan2023-11-14
| | | FossilOrigin-Name: 6f9eed826f5b3d1cb08402925b406a7fe9b54259af1ba5eba92d4d37fbad628a
* Fix harmless compiler warnings in test code.drh2023-10-31
| | | FossilOrigin-Name: d1895dd8f5757a339f619f22b29c8a739398ded673bb9c93f1b8eb8a4b38f510
* When doing a DISTINCT aggregate that contains an ORDER BY, only thedrh2023-10-25
| | | | | arguments to the aggregate need to be distinct, not the ORDER BY terms. FossilOrigin-Name: d2dbbdf7194bab4e5e3b74d3dbffb012a335829824c775c72dd7347c013d2125
* Fix sqlite3ExprDup() alignment assertions so that they work on 32-bitdrh2023-10-23
| | | | | platforms. FossilOrigin-Name: 143f95efc7114455b1920f1d2f9a867392740f608d1dda4306005f01238103f8
* Fix [f5c01676fd281e93] so that it always preserves 8-byte alignment for Exprdrh2023-10-22
| | | | | objects. Add new assert() statement to verify this. FossilOrigin-Name: 678a9728dc6b88d8ef924c86603056df18204bc9a9c4776b9baffd7c5b10c5f2
* Omit some redundant calls to strlen() used to find the size ofdrh2023-10-20
| | | | | | | Expr.u.zToken in sqliteExprDup(). This inefficiency was seen while working on the previous check-in, and I thought it best to fix it while it was fresh in mind. FossilOrigin-Name: b7a84eff5dcdf5b2ff81331097cdc64d0c5d16a4ae224320f39b64541ec72dc7
* Improvements to the sqlite3ExprDup() logic for faster performance and betterdrh2023-10-20
| | | | | | | | run-time error detection. This check-in fixes the 5x oversize memory allocation bug from [f371e4c0f8ea73ae] as well as all other known issues that result from handing the ORDER BY clause of an aggregate function off of the pLeft pointer of the Expr object. FossilOrigin-Name: f5c01676fd281e938181b846dd2024d050f597dc6a7a91928beab9d8553dfdb5
* Simplifications and optimizations to the Expr object duplication logic.drh2023-10-20
| | | | | | The 5x multiplier crutch from [f371e4c0f8ea73ae] is still present. More fixes are still needed. FossilOrigin-Name: 56142a78163b755f16afc05201f623a7a19d9a4b0620a67f7fa20d2a965a288d
* Use sqlite3ParserAddCleanup() instead of calling sqlite3ExprListDelete()drh2023-10-20
| | | | | | directly when disposing of an unused ORDER BY in an aggregate function, to avoid disrupting ALTER TABLE data structures. FossilOrigin-Name: d083e42086733ecd79aba8c268e020b01782bfe1cfa9684ce1c277af9c8bf92a
* For TK_ORDER expression nodes to always be full-size.drh2023-10-19
| | | FossilOrigin-Name: a5c73b46f4772f214ffbfa31cb87dce82ebd690addabef539bd09def26b7744d
* Fix an adverse interaction between the new aggregate ORDER BY logic and thedrh2023-10-19
| | | | | expression compressor. FossilOrigin-Name: f371e4c0f8ea73aee9ea0645f396e3da20f1eb97be34c83de9d94c9cbb959934
* Simplify the Expr compression logic slightly by adding the new EP_FullSizedrh2023-10-19
| | | | | | property to expressions that are exceptions to the rule and should not be compressed. FossilOrigin-Name: d5ae82ec52eafed5e3dc8c9d99685f6523fce7d973ef7e8d9d75ed9b8912426a
* Fix the sqlite3ReferencesSrcList() routine so that it recognizes columnsdrh2023-10-19
| | | | | | in the ORDER BY clause of an aggregate. Fixes a problem with [634286828dad873d] discoverd by dbsqlfuzz. FossilOrigin-Name: 3d26f1aaa4876f21f2c3abf13bbc37933c8f32471153e29019880cc9530cb011
* Merge the latest changes from trunk.drh2023-10-19
|\ | | | | FossilOrigin-Name: d18bc400146812c8c5048af7eaf4a5371ddd80fc9ce895d253b6114b9eae7fc3
| * Fix a false-positive in run-time error checking.drh2023-10-19
| | | | | | FossilOrigin-Name: cd63eec0758960d9ee63d7b964ec62e2bd622f8c94a58bd9556046381ffa18d0
* | Changes for test coverage.drh2023-10-18
| | | | | | FossilOrigin-Name: ddfa09c6031afd4391a9888381bf09214cd542a826b431eeb1537a070f65c5f9
* | Make sure all terms of the ORDER BY within an aggregate go through aggregatedrh2023-10-18
| | | | | | | | | | analysis. Do not attach an aggregate ORDER BY to a window function. FossilOrigin-Name: 16f3805514a741405f70e0ee3b5a6b67720bc75719372e82daa4136fe411ea2b
* | Basic test cases.drh2023-10-18
| | | | | | FossilOrigin-Name: 6cccf86c362631ada0c6cbaf661520648f8bbf7ae2b137b3d7d959647387e5c2
* | ORDER BY on aggregates seem to work, at least for simple smoke tests. Lotsdrh2023-10-18
| | | | | | | | | | more testing is needed though. Surely there are many bugs. FossilOrigin-Name: 64c12a835b6f1df8f2f5f4a41de083f6b3fc7f8030042c6aac0082382cd9cc4d
* | Basic error checking. Resolve symbols in the aggregate ORDER BY expressions.drh2023-10-18
| | | | | | FossilOrigin-Name: c83a53a574d312130d1238c05ffa449d8bed2535d5ef5b5d9cf02f894494cca4
* | Enhance the parser so that it can accept an ORDER BY clause on a functiondrh2023-10-18
|/ | | | | | invocation. For this incremental check-in, the ORDER BY clause is currently ignored. FossilOrigin-Name: 3a98ff24bf468ed42d410a9a12d9f9b2ca154c7babe99fd6bc6f7b0565e0d132
* Change the order of an if..else... in new code to make it slightly faster.dan2023-09-25
| | | FossilOrigin-Name: f80dc64483a54a488e507da140836261ae1b864577cc95d8e869919d5a25e73c
* Fix a harmless compiler warning.drh2023-09-23
| | | FossilOrigin-Name: 7c4210253b660b385d14de3ae7ab30f038036308e1164ec17b40e2805b9b2235
* In partial index scans, if the WHERE clause implies a constant value for a ↵dan2023-09-22
| | | | | table column, replace occurences of that table column with the constant. This increases the likelihood of the partial index being a covering index. FossilOrigin-Name: 66ed7abdfa228abde2052e3988589371f0e49b11582b1b4a83255d2df3a0aefa
* Allow expressions like "<tbl>.rowid" to refer to implicit rowid columns of ↵dan2023-09-15
| | | | | tables in nested FROM clauses. FossilOrigin-Name: 59a1bbc69f5dbb33418fa4b383393fb13a46bc1e531577da8ad54ae2fad5a10e
* Remove out-of-date comment regarding use of Parse.pConstExpr.dan2023-09-09
| | | FossilOrigin-Name: 71548f72ad578db3d6ee409956386ace23ab2258d37cdc29ef2fb126e48f1ee3
* Changes so that sqlite3_vtab_nochange() works with "UPDATE ... FROM...". Use ↵dan2023-08-07
| | | | | this to allow UPDATE on a contentless fts5 table if new values are supplied for all indexed columns. FossilOrigin-Name: 16cd2161e312cf97129011fc829079db8f762b822b2f4fabf7ff6742c071302f
* Multiple optimizations that try to preserve or infer the zero-terminateddrh2023-07-21
| | | | | | | property of TEXT values. Avoid unnecessary copying of text values destined to become function parameters. All changes help improve performance of doing UPDATEs on large JSON values that are indexed multiple ways. FossilOrigin-Name: d0278cdedfa04fb0b61838ab9622be8a2c462f58d5c3ebc4c5f802a727d0974e
* Optimize the argument to the octet_length() function so that it does notdrh2023-06-22
| | | | | attempt to read content from disk. FossilOrigin-Name: 8b8ea4e3f52d96cc217bd1fb27ca4a83489ef1f250756ed2f790d1b0ee529a3a
* Address various harmless compiler warnings fromdrh2023-06-16
| | | | | [forum:/forumpost/d526da8ee4|forum post d526da8ee4]. FossilOrigin-Name: 365caf2f97e8f15842f52536e8d05d359e9d6e863182e020ce14a9a9f27ee057
* Improved sqlite3_error_offset() values for bare column errors on '*' anddrh2023-06-13
| | | | | 'table.*' expressions in SELECT statements. FossilOrigin-Name: 118fe600876686273f85d0a080a21267e83c11826365f3220336b1bd39562518
* Fix straggler misspellings and tidy the custom dictionary. Also include ↵larrybr2023-06-07
|\ | | | | | | | | pickups from [forum:/info/c61fb09afd|forum post c61fb09afd]. FossilOrigin-Name: 8c291d99946eb32b20b743921202f9c7cfb716268ff526817b27adbb7942e40b
* | Add a C-source spell-checking facility. make misspell (on Nix)larrybr2023-06-07
|/ | | FossilOrigin-Name: 26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
* Restore the LEFT JOIN strength reduction that was partially lost indrh2023-06-02
| | | | | [d747afda5683ca5f] when strength reduction was generalized to all OUTER JOINs. FossilOrigin-Name: 2d962b84dd8ac2d0968f0283f8f082c1c2a7a1f99b59053b2ad8f58745396447
* Fix the OUTER JOIN strength reduction theorem prover's handling of the CASEdrh2023-06-02
| | | | | operator. FossilOrigin-Name: 73d7b14b1713d93c4ae07995e9aa6485cbad90bd6125584dbaeccb0cc9410ea3
* Generalize the LEFT JOIN strength reduction optimization so that it works fordrh2023-06-01
| | | | | | RIGHT and FULL JOIN as well. Rename it to the "OUTER JOIN strength reduction" optimization. FossilOrigin-Name: d747afda5683ca5feb92866a14ccc4c5127d3378ece5cad2c3da819f2477b457
* Add an ALWAYS() on an unreachable branch.drh2023-06-01
| | | FossilOrigin-Name: a00928d48061c1169d5564996e19e7d7c2b962842100bb119846d0f696123c23
* Fix the LEFT JOIN strength reduction for IN operators in the WHERE clause.drh2023-06-01
| | | | | Further simplifications and refinement of the algorithm. FossilOrigin-Name: 96c72dde79d4069f6c2f81467a35b617633f86f7a7dcafbda991affdaa1f8537
* Add a comment to explain why both sides of an AND must be non-null-row in orderdrh2023-05-31
| | | | | for the overall expression to be non-null-row. No code changes. FossilOrigin-Name: 8396032ce14a75f408f0a75bcb36a6504d5188f20886e275746a2c336a74296f
* Improved detection of when the LEFT JOIN strength reduction optimizationdrh2023-05-31
| | | | | can be applied. FossilOrigin-Name: f544a8e47cdd5ad7233887a558489983f4f305a39391ff463c43e2e4157da087
* Avoid performing aggregate processing more than once for a single ↵dan2023-05-23
| | | | | expression. [forum:/info/36ff78b2a3|Forum post 36ff78b2a3]. FossilOrigin-Name: 367b4cc549a14222d54530538e692e9d1a365002c1b8c4ef80ddc0523bfdb3a2