aboutsummaryrefslogtreecommitdiff
path: root/src/btree.c
Commit message (Collapse)AuthorAge
...
* The page size becomes fixed as soon as page1 from a non-empty database filedrh2019-01-06
| | | | | is read. FossilOrigin-Name: 6064584d578f0ac7aba3f67912a5d9eb1a3c6001469f6b9becbe68871131f887
* Ensure that when a new cursor is opened by OP_OpenDup, any existing cursordan2019-01-01
| | | | | with the same id opened by a previous OP_OpenDup is closed first. FossilOrigin-Name: 5c188361a91407805c0feb4bf6d3214522ce3e55013efcf63a4613ecd416bcbc
* Fix possible integer overflow while running PRAGMA integrity_check on adrh2018-12-14
| | | | | database file with a badly corrupted freelist. FossilOrigin-Name: 395599116d801324f0763e59bc5e2fc8622aa5b7572e0c1c9a982efbb3cc8280
* Back out the expansion of the temporary buffer size fromdrh2018-12-14
| | | | | | [32754ca6f86da816] and replace it with an explicit test for buffer overreads. FossilOrigin-Name: 8ba3d9f38090c4bbbcffba1930e5c26f69ff61f49b72a4a5a59253d37341380f
* Avoid a buffer overread in ptrmapPutOvflPtr() that can occurs in adrh2018-12-14
| | | | | corrupt database file that has large entries and uses autovacuum. FossilOrigin-Name: f8b781cf41800e9f61a1c5376404a97e76a2bbbcaa17396d42be62f731363947
* When saving the position of a cursor at the b-tree layer, allocate a few extradan2018-12-14
| | | | | | | bytes at the end of the buffer used to save the key. Otherwise, if the key is corrupt, the code that restores the cursor position may overread the buffer by a little. FossilOrigin-Name: 160b1e31c0f27257c06c2987af9ec3a64abfacb2150325b72e8ccd3d217b5baa
* Detect when an attempt is made to write to a pointer map page that is alsodrh2018-12-14
| | | | | being used as a btree page and report corruption. FossilOrigin-Name: 3036fd71ac7063359b04a0ed54a6c63a380eb7ff75cd29ed27486d4259066aee
* dbfuzz2 found a NEVER() that is sometimes true.drh2018-12-13
| | | FossilOrigin-Name: 1201615cbbd3070158ea5fab3d2c8c95f41b25d6da096a44cb9257a7b7405efc
* Add extra tests for database corruption inside the defragmentPage() routine,drh2018-12-13
|\ | | | | | | | | | | as dbfuzz2 has found ways for corruption to leak into that point. Add test cases in fuzzdata7.db. FossilOrigin-Name: 997b65117f8c12dba5fb85434fde9765cdb0d2a49cc3e31979abba3e21350086
| * New database corruption test cases discovered by dbfuzz2. The new casesdrh2018-12-13
| | | | | | | | | | | | have been added to test/fuzzdata7.db, but have not yet all been fixed, so tests will not currently pass. FossilOrigin-Name: b4210d320c6426d2838d4cc08709fdfd015c1c95fcad9a5f9e8fd390c23b9fad
* | Fix a problem in sqlite3BtreeDelete() in which deleting an entry from adrh2018-12-13
|/ | | | | corrupt database can leave a btree page with zero cells. FossilOrigin-Name: 682053d1e603c21b8085c39db618a39b23ec8d2c4d822fd19634db0e03038ea2
* When masking bits off of sqlite3.flags, make sure the mask is 64 bitsdrh2018-12-06
| | | | | in size so as not to accidentally mask of high-order bits. FossilOrigin-Name: 53d3b169d8e1892163526caff2c843302c92e280fdeff6831e23a9bb15b82be3
* Fix a problem reading from temp databases in SQLITE_DIRECT_OVERFLOW_READdan2018-11-22
| | | | | builds. FossilOrigin-Name: 81629ba91475938b6ad528e7b1dbef4ad22239782bb2e9c1bb59413aba11da87
* Correct the internal logic for SQLITE_DBCONFIG_DEFENSIVE.drh2018-11-03
| | | FossilOrigin-Name: 76094345821246c887a31a234b339d03a78eddbb9fab33b06c3c20797c038349
* Add the SQLITE_DBCONFIG_DEFENSIVE flag.drh2018-11-03
| | | FossilOrigin-Name: af3f29d49359af2291b1d9e06e0db76fd000fbd24b4ac84d2668a0d1322efd83
* Improved corrupt database detection in the relocatePage() routine ofdrh2018-10-31
| | | | | the b-tree module. FossilOrigin-Name: d57873337a2a7a0d717dc7726cd2682b5bea594d2d1ff8f16c2485161fcd6b16
* New checked in PRAGMA integrity_check to validate the autovacuum settingsdrh2018-07-20
| | | | | in the header. FossilOrigin-Name: a4663f09c91d1381a831f61a2b8e8a113eb6083932c4aea2ad0c011ece1418c5
* Enhanced detection of problems on the freelist and on overflow list indrh2018-07-20
| | | | | PRAGMA integrity_check. FossilOrigin-Name: 11e58f5b37d99848978007d834d187c262d904eb9d58924742e028d7cb324e64
* Experimental fix for resetting databases that have been deemed read-only duedan2018-07-19
| | | | | to a corrupt "read-version" header field. FossilOrigin-Name: e2394002d02754bb45d56e805df9bc5a2ef0d14e5d94262c1f8ab7643bc27c8f
* Add an ALWAYS() around a branch in sqlite3BtreeSkipNext() that we believedrh2018-07-09
| | | | | must always be true. FossilOrigin-Name: 12be361a532df0c22a7e4d97658b82a69b1a205d4cca8d092b9e6b7790c1ee40
* In wal mode, if a "BEGIN EXCLUSIVE" command (or any other command thatdan2018-07-05
|\ | | | | | | | | | | | | upgrades from no transaction directly to a write transaction) hits an SQLITE_BUSY_SNAPSHOT error, change the error code to SQLITE_BUSY to indicate to the caller that the condition may be transient. FossilOrigin-Name: e6108047cb136119d8ed19af010a669ed9750b4e7f991ccabc9e3d15774eda31
| * Fix a typo inside an assert() statement introduced by the previous commit.dan2018-07-05
| | | | | | FossilOrigin-Name: e3357728472d5e57db6d7eef0ce008bdee071b5b07b60e242f383440eebe85bd
| * In wal mode, if a "BEGIN EXCLUSIVE" command (or any other command thatdan2018-07-05
|/ | | | | | | upgrades from no transaction directly to a write transaction) hits an SQLITE_BUSY_SNAPSHOT error, change the error code to SQLITE_BUSY to indicate to the caller that the condition may be transient. FossilOrigin-Name: 221ff63e7902226ebf728bb7442727420636831163708f360724506ce9487ab6
* Omit all window-function related code when building with SQLITE_OMIT_WINDOWFUNC.dan2018-06-22
| | | FossilOrigin-Name: 5f04b016467342b5a796bf702ed25b621eb86f2961c1e703d276c93f2cb6aa89
* Fix another issue to do with window-functions in aggregate queries.dan2018-06-12
| | | FossilOrigin-Name: 6413e38a174044c28fa9b8b937e6c972d144547a246e6f2882e782538300d042
* Merge recent trunk changes with this branch.dan2018-06-09
|\ | | | | FossilOrigin-Name: c71f23590c25b4cecd27722e6c0fc8e3bf320d399c7d9398b7016dd5cf5b05eb
| * Fix an assert() that can be false for a corrupt database and a strange querydrh2018-06-08
| | | | | | | | | | | | that uses a recursive SQL function to delete content from a corrupt database file while it is being queried. FossilOrigin-Name: 99057383acc8f92093530e216c621d40386a06fe98131ff0af6df524d80a6410
* | Merge latest trunk changes with this branch.dan2018-06-07
|\| | | | | FossilOrigin-Name: 251022034219819a1dc356542770ff46e3147a080f072eb20af6106771dadd92
| * Change sqlite3BtreeBeginTrans() to return the BTREE_SCHEMA_COOKIE, for adrh2018-06-06
| | | | | | | | | | small speed improvement when starting new transactions. FossilOrigin-Name: a10662aa915ae2b5a78b3e10920350d32255b2d6b1a8aac0aba1ad173b07ed2b
* | Merge latest trunk changes into this branch.dan2018-06-04
|\| | | | | FossilOrigin-Name: 83d6416a868fac81a78c9507185a48d00920e4322276245e285946f760915f4a
| * Work around a sanitizer warning about a pointer being only 4-byte aligneddrh2018-06-02
| | | | | | | | | | instead of 8-byte aligned. FossilOrigin-Name: 1b807b51cdf455b4f54216b73fd22bbc90f94e24222401e045f88cfd27f487e3
* | Add support for "ROWS BETWEEN <expr> PRECEDING AND <expr> FOLLOWING" windowdan2018-05-23
|/ | | | | frames. FossilOrigin-Name: 3a203660f1e4da3b8d2d605c494f4843f6e00752f28042b49e11d7d6550dd406
* Make the internal dynamic string interface available to extensions usingdrh2018-05-09
| | | | | | | the new sqlite3_str object and its associated methods. This is mostly just a renaming of internal objects and methods to use external names, through there are a few small wrapper functions. FossilOrigin-Name: 87f261f0cb800b06ad786f6df16f2c4dddd0d93dfdcc77b4a4eaa22920b56bf1
* Activate the cell-overwrite optimization for index b-trees.drh2018-05-07
| | | FossilOrigin-Name: a68697d10ef17d452c8279181186faad7bc54e3a35858a336552f717449065ea
* Improved comments on the cell-overwrite optimization code.drh2018-05-07
| | | FossilOrigin-Name: a4fe966da2fc479b18bf521ff596000410af3a611f7d8723d126795e595ccf22
* On an UPDATE, try to overwrite an existing btree cell with the modifieddrh2018-05-07
|\ | | | | | | | | | | content, if the old and new cell are the same size. Use memcmp() first to avoid dirtying pages that are unchanged. FossilOrigin-Name: 5887d8beb502ad62689d31b850f46ab50831a1e9db36adf20d55ad45619d207e
| * Fix harmless compiler warnings in the cell-overwrite logic.drh2018-05-07
| | | | | | FossilOrigin-Name: 3e11dc3183bc3e8ec49af244a8e8b3e07d12f7a2e59028b2bf64ce0ab589a91f
| * Fix various error handling conditions on the cell overwrite optimization.drh2018-05-03
| | | | | | | | | | Fix a test case so that it works with the new optimization. FossilOrigin-Name: f89b54f41405ed7e28132f66b8a0c690a087c2412c8f55790c2beabb0b521645
| * The BtCursor.info fields are only valid if info.nSize!=0.drh2018-05-03
| | | | | | FossilOrigin-Name: 54c537eead5b08104cfaf0d5b1e2706e53d6f74be2ca02e06229024fd889fc94
| * Add more corruption checking to the cell overwrite logic.drh2018-05-03
| | | | | | FossilOrigin-Name: 58d14afe1e1288d114ea213458b3121e0a95670887861928858b7f143c76f789
| * Bug fixes in the overwrite optimization.drh2018-05-03
| | | | | | FossilOrigin-Name: 0cb6cd2a6a596afaa1cca6c5f5abc2ea75d04f254c7debaf36ecd6a90b66aed6
| * The sqlite3BtreeInsert() routine tries to overwrite an existing cell withdrh2018-05-03
| | | | | | | | | | | | modified content if the new content is the same size. Pages are only dirtied if they change. This prototype works some, but still has issues. FossilOrigin-Name: 489451b378819621537231c1c8a07704437e11c1f5384fd53b09f3977d2213a4
* | Fix a slightly incorrect corruption detection branch in the btree logic.drh2018-05-05
|/ | | FossilOrigin-Name: 9191ff670cb7f36e0b2dac4a22888679b639845687aef8edcc3c05e35ba71eda
* Add the "PRAGMA reset_database=ON|OFF" command. When on, it causes thedrh2018-04-28
| | | | | | database to appear to be empty, causing the next transaction to reset it to an empty database. FossilOrigin-Name: 02e1a13c1f04bb72599b98f51240c78d0d050de264fef5808fd97db3f4c16dac
* Avoid a race condition that might cause a busy_timeout to last longer thandrh2018-03-26
| | | | | it should. FossilOrigin-Name: b81960561b47a1b49646f2f8870dd0684dc4ca7c0b9e11076fd713de66b75972
* Add infrastructure to support for using F_SETLKW with a timeout on systemdrh2018-03-26
| | | | | that support that functionality. Requires SQLITE_ENABLE_SETLK_TIMEOUT. FossilOrigin-Name: 2e54a7433ece4eb27e71bda6f2d121d5aa46ddd5a481357d8543d1432aaad689
* Refactor some internal object element names used by the busy handler, todrh2018-03-26
| | | | | simplify analysis. FossilOrigin-Name: 6c40c5574f4ae9795a142d01a8f84afd1b72678ea5f6bfca14a8646c4e862605
* Fix an assert so that it compares two CellInfo objects field by fielddrh2018-02-19
| | | | | | instead of using memcmp(). Memcmp() does not work on x86 because of uninitialized padding bytes. FossilOrigin-Name: 88258770adead70fa101c74e266a37bb9aaffac0ba738a4b345617feb8c46477
* Fix harmless compiler warning seen with MSVC.mistachkin2018-02-04
| | | FossilOrigin-Name: 63a914410b5750bd08836864ae456ff09549487c5ce49706fedffa3d4f973059
* Rearrange fields of the BtCursor object so that it is smaller and requires lessdrh2018-01-24
| | | | | initialization, for a small performance improvement. FossilOrigin-Name: 0ddf5292cc0411ec6fcb7399ecf2904c899e0488404d3f65490fbe1db15efdf4