aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
Commit message (Collapse)AuthorAge
...
* 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
* As evidenced by [forum:/forumpost/f3f546025a|forum post f3f546025a], thedrh2023-05-15
| | | | | | | | | new RIGHT JOIN related restriction on the push-down optimization implemented by [da3fba18742b6e0b] also needs to apply to the automatic index (a.k.a. hash-join) optimization and to the Bloom filter optimization. Computation of the restriction is now moved into the sqlite3ExprIsSingleTableConstraint() routine. FossilOrigin-Name: 4902015dcf3869f08d9986e422faa231d9218a5e0fc59ba8df0f407e4eb3d605
* Rename sqlite3IsTableConstraint() to sqlite3IsSingleTableConstraint() anddrh2023-05-10
| | | | | | improve its header comment, in an attempt to make the code easier to reason about. No functional changes - should generate identical machine code. FossilOrigin-Name: 5dae897431a0a9dbb354c4a8a48f935ea7438035d96f90b83dd81eae434c8277
* Do not overflow the Index.aSample[] array if the same index appears indrh2023-05-03
| | | | | | the sqlite_stat4 table under multiple names because it is a WITHOUT ROWID primary key index. [forum:/info/537d8ab118df7edd|Forum post 537d8ab118df7edd] FossilOrigin-Name: 9350a25ac0b55a6b901bc50e4db6d4e883c2617e1d2a8fdc90effabe52bb0012
* The gcc definition of the SQLITE_INLINE macro is not compatible withdrh2023-05-01
| | | | | string ANSI, so disable it if the -std=c89 command-line option is used. FossilOrigin-Name: 62d703d83cf8cf3358715792347c49315a82c659e475158e385746f4329a4f39
* Accept the full ECMAScript 5.1 IdentifyName syntax for keys in objects.drh2023-04-30
| | | FossilOrigin-Name: 9be2c87518b33713210e3e2fa56924888e19415c71329141d18150b275f6f25e
* New assert() statements to validate the parameters todrh2023-04-10
| | | | | | | sqlite3BtreeCursorHint(). Fix a problem with the construction of those parameters discovered by [forum:/forumpost/0b53708c95|forum post 0b53708c95]. FossilOrigin-Name: 4c5a3c5fb351cc1c2ce16c33314ce19c53531f09263f87456283d9d756002f9d
* Tweaks to the new insertCellFast().drh2023-04-07
| | | FossilOrigin-Name: 203a581a9177c1083e8d5b49e8ff026af33b5c5e3e144aeda126f07a3a2953bf
* Clone insertCell() into insertCellFast() for use by sqlite3BtreeInsert() fordrh2023-04-07
| | | | | a substantial performance increase. FossilOrigin-Name: f225afd90c8e65661d8b855050f0ee1a8fe4c0f3bcec824aa5a66d906f3c7119
* Add the SQLITE_VTAB_USES_ALL_SCHEMAS option to sqlite3_vtab_config(). Updatedrh2023-04-03
| | | | | | | | | | the sqlite_dbpage, sqlite_dbdata, and sqlite_dbptr virtual tables to make use of that interface. This was formerly handled by the internal sqlite3VtabUsesAllSchemas() routine that was called directly from sqlite_dbpage. But since sqlite_dbdata and sqlite_dbptr are an extension, an external interface to that functionality had to be provided. dbsqlfuzz 1a29c245175a63393b6a78c5b8cab5199939d6a8 FossilOrigin-Name: bcd51abee0b0f82bb5dbb881025a92d55baf9df6adeaf3a305e2e0da96a81d58
* Fix harmless compiler warnings.drh2023-04-01
| | | FossilOrigin-Name: a4fb2864fe01cce9694242a0750623ca47fcecd68f74c4239d3eb5fbf978770a
* Fix multiple problems with RETURNING on a DML statement against a view,drh2023-03-28
| | | | | | | | | | all inspired by [forum:/forumpost/dc3b92cfa0|forum post dc3b92cfa0]. (1) Do not allow a RETURNING clause to trick the code generator into thinking that the view being updated has an INSTEAD OF trigger. (2) Generate all result columns for a view in a DML statement. (3) The automatic covering index for a view should cover all result columns of the view. FossilOrigin-Name: c8bedef0d61731c29ae34de1594222d15b578f9e2cddbbd5b74fb3059644fe0f
* Improvements to register allocation, especially in the ANALYZE command.drh2023-03-26
| | | | | | New assert() statements added to help verify that memory allocation is correct, and to help fuzzer find lingering errors. FossilOrigin-Name: 6f8b97f31a4c8552312b4c98432ea356ae54c06d9cc929969f50c3c88360cd7b
* Fix assert() statements that would (incorrectly) fire if an IF NOT EXISTSdrh2023-03-17
| | | | | | trigger that already exists contained two or more RETURNING clauses. Tickets [89d259d45b855a0d] and [d15b3a4ea901ef0d]. FossilOrigin-Name: 648899e4ded72cac6cc24bccf7ebfc709ee7309a003452b21fd6ab0ba20c34b8
* Disallow the one-pass optimization for DELETE if the WHERE clause containsdrh2023-03-15
| | | | | | | | a subquery. Fix for the problem reported by [forum:/forumpost/e61252062c9d286d|forum post e61252062c9d286d]. This fix is more restrictive than necessary. It could be relaxed if the subquery does not involve the table that is the subject of the DELETE. FossilOrigin-Name: 73f0036f045bf37193b6e87ae45b578c5831614c530488257c69666178da3aa5
* Do not use an expression index on a generated column if generated columndrh2023-03-03
| | | | | has the wrong affinity. dbsqlfuzz 65f5eb57f8859344d5f1f33e08c77ee12960ed83 FossilOrigin-Name: e95439119ac200cb47d0e277622f41ee7986b364487cd252b485ce5fa030d70f
* Change the name of SQLITE_DBCONFIG_STMT_SCANSTATS to ↵dan2023-02-28
| | | | | SQLITE_DBCONFIG_STMT_SCANSTATUS. FossilOrigin-Name: a63e4a150b505fc309fac847131009ee9965eb1b798ebcb202ec8b52f9189240
* Add an sqlite3_db_config() option - SQLITE_DBCONFIG_STMT_SCANSTATS - for ↵dan2023-02-28
| | | | | enabling and disabling the collection of sqlite3_stmt_scanstats() statistics in SQLITE_ENABLE_STMT_SCANSTATUS builds. Collection of statistics is disabled by default. FossilOrigin-Name: 0f5579bef27b84ee855065cfe87703c51e1f9773906a9e0d4e4dafc90bd0e553
* Allow the sqlite3_config() interface to be invoked at any time for a fewdrh2023-02-23
| | | | | | choosen options: SQLITE_CONFIG_LOG, SQLITE_CONFIG_URI, and SQLITE_CONFIG_PCACHE_HDRSZ. This list will likely change before release. FossilOrigin-Name: e1702eb48d13c7c9b7605f1e77242672222c53059edcdc4e9cea59510715822a
* Provide an optimization-disable mask for this optimization. Do not do thedrh2023-02-16
| | | | | | | optimization if the subquery is an aggregate or is distinct, but allow it to be an ephemeral subquery. Do not omit columns that are used in the ORDER BY of the subquery. FossilOrigin-Name: 6b1a1f374d1372f11f5420d99645b218867100bf070bd3a8885bf5f00c189dff
* Back out the 'txn' enhancement to date/time functions. The duration of adrh2023-02-08
| | | | | | "transaction" is confused and needs to be straightened out prior to moving forward with this change. FossilOrigin-Name: 4a145f07322d768a07619bed27e0390d50f3a01d07787b9296234a5ceb6f1218
* Always use 64-bit integers for stats associated with STAT1 and STAT4.drh2023-02-08
| | | FossilOrigin-Name: 6647d1cb8b53102c8114b1f3e34173d907504d78aa3140eab53f88027a36660b
* Simplify the code and add test cases.drh2023-02-07
| | | FossilOrigin-Name: d3bed4caff561e71c396cc869c5b4d9bf216ba203485e738c12ec62741f1aba5
* Add support for the 'txn' argument to date/time functions that works likedrh2023-02-07
| | | | | 'now' but keeps the same time for the entire transaction. FossilOrigin-Name: 5e4f45af96247e29910403a63ac148cb313b005f9c014b37a9a49d98f5fef9a6
* Fix sqlite3_prepare() so that it only invokes the progress handler on everydrh2023-01-12
| | | | | | | N-th call to sqlite3ProgressCheck(), where N is the progress handler step count. Also fix faulty asserts exposed by the ability to interrupt in the middle of sqlite3_prepare(). FossilOrigin-Name: 05461651599bb490ac6cfd893645dabab9cccedc6adcce15aee2487b2ea6027a
* Attempt to provide a mechanism to do early termination of long-runningdrh2023-01-12
| | | | | | | statement preparation by invoking the progress handler at strategic points during sqlite3_parpare(). This experiment shows that sqlite3_prepare() might leave the resulting prepared statement uninitialized following an interrupt. FossilOrigin-Name: 79636f2d80aee70832913a78933da2a7e30cc037810b93903ebbc1925ea93fef
* Fix JSON functions so that they work correctly under PRAGMA trusted_schema.drh2023-01-09
| | | | | [forum:/forumpost/c88a671ad083d153|Forum thread c88a671ad083d153]. FossilOrigin-Name: 51a5d83c425d2e31508b73074d0076156817afb19003f847d16bf4a69ae5077b
* Remove the unused "sqlite3StackAllocZero()" macro.drh2023-01-04
| | | FossilOrigin-Name: f0ca57207e9f3ab401264498f65c249b479d9e0da7158e001b002584ac67dd0a
* Avoid an unnecessary call to strlen() in the sqlite3VdbeMemStringify() routine,drh2023-01-03
| | | | | for a performance increase and size reduction. FossilOrigin-Name: 284382d37850f469dc4bf3ab8efd2f20971554e897f1ba3e94d3f2f0c35d97d0
* Fix lots of harmless, nuisance compiler warnings, mostly unused parameterdrh2022-12-23
| | | | | warnings in extensions. FossilOrigin-Name: c14bbe1606c1450b709970f922b94a641dfc8f9bd09126501d7dc4db99ea4772
* Squelch a new (and, in this case, harmless) compiler warning.stephan2022-12-23
| | | FossilOrigin-Name: a02e19dd6ce00492f3d187e3c3c9bde4d9d1ee9a23616e62ea3590eec95652bd
* More efficient implementation of large precisions on the "%c" format fordrh2022-12-21
| | | | | | the built-in printf(). This is an effort to avoid a reported timeout on a (ridiculous) query generated by OSSFuzz. FossilOrigin-Name: 371f9b88387a44a5f820279d79733d1deb7eafc72f320ec47a11679bbdbb49ef
* Do not use indexed expressions to replace the expression being indexed on adrh2022-12-20
| | | | | | RIGHT JOIN as that leads to problems, as shown by dbsqlfuzz a644e70d7683a7ca59c71861a153c1dccf8850b9. FossilOrigin-Name: f113eebdbe68246fd38d640b0cdf0fd73ab5d2abad9226274dfa2e41fe286bf0
* Create a new affinity called FLEXNUM that works like NUMERIC except that itdrh2022-12-15
| | | | | | | | | never tries to convert integer to real or real to integer. The affinity is only used internally - it is not possible to create a table column with this affinity. This affinity is used on subqueries and views that are built off of a compound SELECT and where the datatype is controlled by a CAST expression. dbsqlfuzz c9ee6f9a0a8b8fefb02cf69de2a8b67ca39525c8 FossilOrigin-Name: 44135d6ea84f7ba6b36549954b38a8bc048d5ffea5a9779e35950afa4eb2dfb2
* Merge all the latest trunk enhancements into the coroutines-exp2 enhancementdrh2022-12-14
|\ | | | | | | | | branch. FossilOrigin-Name: ea278438b72e85d217e72c836cbefd68bd8b336baf33507b2d8d12ef436424cd
| * If the SELECT that implements a subquery or a VIEW or a CREATE TABLE AS isdrh2022-12-14
| | | | | | | | | | | | a compound with different result datatypes on two or more arms of the compound, then the overall column type becomes BLOB (ANY). FossilOrigin-Name: 6ebb178c6b688ebd632e91a5ec4c748567833037c679ab3d72fb770deb230fe1
| * Back out the part of the change in [88a05141c28e5ff1] that adds affinity todrh2022-12-14
| | | | | | | | | | | | | | | | | | | | | | the materialization of a view, as the affinity can be undefined for a compound query. This passes all TCL tests, but shows failures in the TH3 tests derived from [forum:/forumpost/6f842bc5b2dadcb2|forum post 6f842bc5b2dadcb2], presumably because the WHERE clause of the query uses constraints of the form "source_crs_code='8675'" instead of "source_crs_code=8675". Perhaps further changes on this branch should reimplement affinity on joins in cases where the affinity is unambiguous. FossilOrigin-Name: fe5a77bcc4de8f49cc4fe6bd2e2e1f31da8d3bc84120daaa99eb853b06291d15
| * Refactor the sqlite3SelectAddColumnTypeAndCollation() routine. Improveddrh2022-12-13
| | | | | | | | | | comments. Now called sqlite3SubqueryColumnTypes(). FossilOrigin-Name: 4dfb1b450b87e2c6207c83c102b785781d1dbdeadbeeab6a83f96d58bb96cfbf
* | Remove the SQLITE_PREPARE_SAFEOPT flag. The name is obsolete and it is at thedrh2022-12-09
| | | | | | | | | | wrong level. Instead use the SF_UpdateFrom flags on the Select object. FossilOrigin-Name: 78723a9a7e72b42d28fc5645661da17f20cedcf864819b861800ad9340007be1
* | Simplified experimental changes to promote the use of co-routines. Lessdrh2022-12-06
|/ | | | | | cruft than the coroutines-exp1 branch, but still does not work. Checked in as a work-in-progress. FossilOrigin-Name: e2318a30bf6ad2aeb4c4cb29661bc24ff78eb51bf07decc4b8da1ecac0015ef0
* Enhance the sqlite3_stmt_scanstatus() API and add ↵dan2022-12-02
| | | | | sqlite3_stmt_scanstatus_v2(). For creation of easier to read query performance reports. FossilOrigin-Name: 55800833645739efeddcacef464c623931cb6aeb43f4219b4e4faf473c25c8bb
* Attempt to rationalize the bits associated with ".wheretrace". Providedrh2022-11-30
| | | | | a decoder key in sqliteInt.h for what each bit is intended to do. FossilOrigin-Name: 8ec361695a107a94f2cf6a7fe509656a99d85d49bd7c74133c69903f059a2675
* Change the handling of hwtime.h to make it easier to compile performancedrh2022-11-29
| | | | | | measurement builds that make use of hwtime.h. This should not affect productions builds. FossilOrigin-Name: f64a224244743ab121371abd516fccbfc93c110e0952211764bd1b217e792c1b
* Improved comments. Add assert()s to verify that the AggInfo structuredrh2022-11-25
| | | | | is unchanged after registers have been assigned. FossilOrigin-Name: 5200b84195ee1ccaa387f7032eae3d463724c48cb53ba0251bbc79e927dd9752
* This attempt at modifying AggInfo to make use of indexed expressions does notdrh2022-11-23
| | | | | work. It gets an incorrect answer for the test case shown in the ticket. FossilOrigin-Name: 84c06023f4a1606664fdb9811312603b31f7c94a43d0e443ba7dde7fdba029e3
* Merge enhancements and fixes from trunk.drh2022-11-22
|\ | | | | FossilOrigin-Name: f8932e04d4d18eb9d71edda15aa08af2eb139ff14d77ca147ea6e9b173e0f5e0
| * Include the treetrace bitmap comment accidentally omitted from the previousdrh2022-11-22
| | | | | | | | | | check-in. FossilOrigin-Name: db07471c531766a8eec1d5b41c9fd0283b5e64ee13166dc3391f70a1e1946121
* | Merge trunk fixes and enhancements into the agg-with-indexed-expr branch.drh2022-11-22
|\| | | | | FossilOrigin-Name: 070634781a5eb41f96b001e48b064e3cd8c82314f576335eb1fcd43792179291
| * Rename the SELECTTRACE macro to TREETRACE, so that is corresponds to the newdrh2022-11-22
| | | | | | | | | | | | | | CLI command. Renumber all of the bits in the bitmask used to enable various kinds of tracing, and add a trace bitmap decoder in sqliteInt.h. Changes to debugging logic only. No (intentional) changes to production code. FossilOrigin-Name: 8036445a36d9d982c1305935e7e37367bdf9e466b923eb6286b52524802e3ccd
* | Since the memory registers used by the columns and functions of andrh2022-11-22
| | | | | | | | | | | | | | AggInfo object are sequential, it is not neecessary to remember each register separately. We can simply remember the first one and do the math when others are needed. FossilOrigin-Name: dc5bd34963b761c819c565653156d0befbf65cc2cc5dc4113b0ce952450f0352