aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
Commit message (Collapse)AuthorAge
* Fix an off-by-one error in tests for cells overflowing the end pages. Thedrh2023-07-13
| | | | | | | error is completely harmless for the default page cache, but might cause problems for application-defined page caches that pack pages tightly together. FossilOrigin-Name: ce6793e954f291b6f5c29175baf730ce217328de1f0601b8935daac62af5f448
* Omit the use of memmove() in sqlite3FpDecode() in an attempt to avoiddrh2023-07-07
| | | | | | spurious warnings from valgrind. Also makes the code slightly smaller and faster. FossilOrigin-Name: b409943af00e35ad05906d0a80ffa1225a66f3d807c131e00cfbf6671a03a981
* Whether or not to use the long-double floating point conversion techniquedrh2023-07-03
| | | | | is now a test-control setting. FossilOrigin-Name: 02ae6caff1f7925c696ad263fe78b1036364d24b6373e1baec10d53aafb14a12
* Improved rounding policy.drh2023-07-01
| | | FossilOrigin-Name: 6f1122e942b8269552daaf13d647d200d8546ec25f36310d67037c6b58d09976
* Improved response to Infinity and NaN. Remove the termporary fpdecode()drh2023-07-01
| | | | | function. FossilOrigin-Name: 76ab8ae809a47a66688e2d50c20dc87ce946d82e9ffebb3adda55c451fad07fc
* Add decimal rounding to the sqlite3FpDecode() routine.drh2023-06-30
| | | FossilOrigin-Name: 27871140caa833f0bc0962e44356993938e93dcf81c1074382b1560a3e1aeb61
* Experiments with a new algorithm for converting ieee-754 binary64 numbersdrh2023-06-30
| | | | | into decimal. FossilOrigin-Name: e923405e448385085224f9289991b303d86b02763535ea77d6fcee98ba6fc1f2
* Completely unwind the enhanced precision sum() from [a915f15a916af698] sodrh2023-06-30
| | | | | as not to offend UBSAN and OSS-Fuzz. FossilOrigin-Name: 85be05b66ef975f02a3e7b2984bcab97d9280c7f3b6ee1e16718de549f240d46
* Use ideas from T. J. Dekker in "A Floating-Point Technique for Extending thedrh2023-06-26
| | | | | | Available Precision" (1971-07-26) to enhance the accuracy of the SUM() aggregate function in cases where input magnitudes vary wildly. FossilOrigin-Name: 439fc00fee62b4db3751860485e21a99cae4fd1f5d911b2c08651a1466245ecc
* Optimize the argument to the octet_length() function so that it does notdrh2023-06-22
| | | | | attempt to read content from disk. FossilOrigin-Name: 8b8ea4e3f52d96cc217bd1fb27ca4a83489ef1f250756ed2f790d1b0ee529a3a
* Avoid unnecessary NULL pointer checks on calls to sqlite3WalkExpr().drh2023-06-19
| | | FossilOrigin-Name: 73d86a12fb068456a884c030fddd87020d6ec9d56376de541cf082b2104174d3
* Improved sqlite3_error_offset() values for bare column errors on '*' anddrh2023-06-13
| | | | | 'table.*' expressions in SELECT statements. FossilOrigin-Name: 118fe600876686273f85d0a080a21267e83c11826365f3220336b1bd39562518
* 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
* 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