aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
Commit message (Collapse)AuthorAge
...
* Make sure the new u1.nRow value is copied when making a copy of a SrcItemdrh2024-03-19
| | | | | object. This fixes a problem in [ac6f095e13e43d66] from yesterady. FossilOrigin-Name: 262f8f9d80d37160e4126634b99aa48fce2073e61f6365e8bdbe1cc4fa560a96
* Fix the patch at [10ee6fcba08ab128] so that it works on reduced-size Exprdrh2024-03-18
| | | | | nodes. FossilOrigin-Name: 260bd764c3f2d6d067adb9cd0045b7c24d5e00b02ab2735b1cba455a6143ff4c
* Fix a problem caused by a non-aggregate function with an OVER clause in a ↵dan2024-03-18
| | | | | multi-row VALUES clause. FossilOrigin-Name: 10ee6fcba08ab1281235197602148fe062560e1d5034a477b8e7b574dd3e2907
* A formerly impossible case has now become possible because of the newdrh2024-03-16
| | | | | ExprIsConstant enhancements. So deal with that. FossilOrigin-Name: 9ba3cff9d48fe8fc8a0a51291169599209d464465e44bdfd60058fd1e314a2b1
* Further expand the scope of usage for the enhacement to expr-is-constant.drh2024-03-16
| | | FossilOrigin-Name: d7eadcf7dd089f0f4aa963c58f0df32edd951368c9906375fd62b0a61cd393b8
* Assert that the eCode is always non-zero upon entry into exprNodeIsConstant().drh2024-03-16
| | | FossilOrigin-Name: f71b28f6713126745bca53e098dfe3444d4235d6a2b87ced5b333a7f0ee79be8
* Fix exprNodeIsConstantFunction() so that it returns WRC_Continue, not ↵dan2024-03-16
| | | | | WRC_Abort, if the function really is constant. FossilOrigin-Name: d85dd4de2d0989127e0ae6a2eec9d83a577777f8d5ba40700084a0b498016634
* Enhance the sqlite3ExprIsConstant() function so that it recognizesdrh2024-03-16
| | | | | | constant functions. So far the enhancement only applies to the multi-row VALUES clause, but it could possibly be applied in many other places. FossilOrigin-Name: c9e0488c6c0135932b6e76b0f3f3acd69ef65327e0a54daa59777f35da1aef26
* Attempt to reduce the memory used by VALUES clauses in as many statements as ↵dan2024-03-11
| | | | | possible, not just INSERT. This branch still has problems. FossilOrigin-Name: 17d1f7cfabc7593d0725051b0c7c9619a23a482265f30f15ab9493fef5caeeb0
* Remove code that added a P4 parameter to the OP_Variable opcode. This is no ↵dan2024-03-05
| | | | | longer required. FossilOrigin-Name: dd5977c9a8a418be3fbd646d74933996381099a9263a02eb4a990f0084463dc1
* Always convert 32-bit integer literals into EP_IntValue notation, even ifdrh2024-02-28
| | | | | they contain "_" separators. FossilOrigin-Name: 2dfc427f676255cbe189a26bfec2405d41d31ccc4512c55b31e6e633261d7a23
* Remove an ALWAYS() added in [c50e6c2ace49d092] because it is sometimes false.drh2023-12-24
| | | | | dbsqlfuzz c393a4f783d42efd9552772110aff7e5d937f15e. FossilOrigin-Name: b9daf37e57cde12c4de271a2b1995e8e91b6411f8c2e8882e536241929609b3a
* 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