aboutsummaryrefslogtreecommitdiff
path: root/src/btree.c
Commit message (Collapse)AuthorAge
...
* | Block on the WRITER lock when attempting to run recovery.dan2020-05-06
| | | | | | FossilOrigin-Name: 105d6c9bbcadc64faa2b24e315cb13227b17cfc6bf1b3512713f80ce56976a3d
* | Merge latest trunk changes into this branch.dan2020-05-06
|\| | | | | FossilOrigin-Name: a3727dba10b476f414f0a049b35f2a5c169a408eccefa6833821560684e07f8b
| * The only known path to a corruption detection branch was cut off by thedrh2020-05-05
| | | | | | | | | | | | previous commit implementing earlier index corruption. So make the branch NEVER. Maybe a fuzzer will find a new path. FossilOrigin-Name: 9a84d8eb44b12ddea921baa73ac3bffa8c8d23a852605dc1dbde37907360bd79
* | Unless upgrading an existing read transaction, have ENABLE_SETLK_TIMEOUT ↵dan2020-05-05
| | | | | | | | | | builds attempt to use a blocking lock when opening a write transaction on a wal mode database. FossilOrigin-Name: d6f819a9e6b35f3fd558bd93255a6a24ad690a0fa15a82b009ca9c641db983c6
* | Changes to avoid deadlock in SQLITE_ENABLE_SETLK_TIMEOUT builds.dan2020-05-04
|/ | | FossilOrigin-Name: 553423c23142cf0ec219192315d57ce8a0e10c3d8678d28bc110a1a9a7c17cee
* Merge recent trunk enhancements.drh2020-05-01
|\ | | | | FossilOrigin-Name: 2100b2c8f339e9778723fa0c91e479bab8675cf6fbea1664b6af49f40db6d27b
| * Clarify the comment on the sqlite3BtreeGetRequestedReserve() routine.drh2020-04-22
| | | | | | | | | | No changes to code. FossilOrigin-Name: 52a6acca6d5d376308d354c02f4d676d9375c34c3841d7b1941196ee8b4e2511
| * The SQLITE_TESTCTRL_RESERVE operator is removed. In its place is thedrh2020-04-20
| | | | | | | | | | | | more generate SQLITE_FCNTL_RESERVE_BYTES which is an API and which can operator on more than just the main schema. FossilOrigin-Name: abc1aad74f7b6a1e72fb09936239f2224aa942d16296c6a3de0b8daef4bc8471
| * Remove an obsolete comment. No changes to code.drh2020-04-20
| | | | | | FossilOrigin-Name: 4135cb024456288d9c85aef5fb572dbb591527dd33d9a60ca5946b712c269941
* | Merge recent enhancements from trunk.drh2020-03-31
|\| | | | | FossilOrigin-Name: c705ce266ad25af71791035590875f0ea9f2c72826b3eda17f065d2bf091de92
| * Use __atomic_load_n() and __atomic_store_n() for a few more things where ↵dan2020-03-30
| | | | | | | | | | they are available. FossilOrigin-Name: a49f8ec552bede7da731e0571ccf49de1a30e7be3a5673150436c8b411ba6ffc
* | Remove the SQLITE_OMIT_BTREECOUNT option. Btree count is required.drh2020-03-17
|/ | | FossilOrigin-Name: a9bfa47aeea27e91611ba913d33e6635d2016e2c2ab78f9b0657f1bd8933e1a8
* Avoid a redundant NULL checkpdr2020-03-08
| | | FossilOrigin-Name: 25dc53f6608dd9b8b4e8d8ee22e194a6d41d15811781752797cb42fc22ee1317
* Remove a NEVER() macro and add a test case to cause its argument to be true.drh2020-02-18
| | | FossilOrigin-Name: ee034fe916448e953ee7824e5c0db99a36a0ad138ebfb25f751bf84cb80a8fa7
* Simplify the code by removing the unsupported and undocumented drh2020-02-07
| | | | | SQLITE_HAS_CODEC compile-time option FossilOrigin-Name: 5a877221ce90e7523059353a68650c5fdd28ed032807afc2f10afbfbf864bdfe
* Remove a NEVER() that is in fact reachable. Test cases in dbsqlfuzz and TH3.drh2020-01-29
| | | FossilOrigin-Name: ffd8bb9351fbd8c1285491d4e10734f6816689de6042d640c178a5ecda75a5ef
* Remove an ALWAYS on a branch for improved database corruption detection drh2020-01-14
| | | | | in btree.c:freeSpace(). Test case found by dbsqlfuzz. FossilOrigin-Name: 54bf04811951db6c894f272f870e3e41f8f5e05a25c1115efbbdbd0d8bba54be
* Fix a performance regression caused by the previous check-in.drh2020-01-07
| | | FossilOrigin-Name: d7d98d3dff2f0e0cfa5bb8be8e5fd2af5ab470be399eafe3d77b23ee1262f70d
* Add an "|| CORRUPT_DB" term to an assert() statement inside of btree.drh2020-01-07
| | | FossilOrigin-Name: 03c1d75ddc063469fc856114595bd12d21759fe0979ce1ba1cf52e48e6b0d4a1
* Remove a NEVER in btree due to a new test case from dbsqlfuzz.drh2020-01-05
| | | FossilOrigin-Name: 46f8ef70fb8b3ae00cc081b280f3dff38b1d0f1b52a8f4477ec89dec32e4d813
* Remove another NEVER added by check-in [7b62555e285f32d3].drh2020-01-04
| | | | | Dbsqlfuzz found another test case. FossilOrigin-Name: 481f4956aff52797880930752693a8c0b10d7fdd71d86919fe8ee13c90ad5b81
* Back out another NEVER added by check-in [7b62555e285f32d3] - the test casedrh2020-01-04
| | | | | | was already in test/fuzzdata3.db, but it only occurs if compiled without SQLITE_ENABLE_PREUPDATE_HOOK. FossilOrigin-Name: 61f873b14c2c835f3d10b018b357cb8b1f041e97e05709d7ab5a8055e5e05349
* Restore a NEVER and an assert in btree that was removed bydrh2020-01-04
| | | | | check-in [7b62555e285f32d3]. Dbsqlfuzz found test cases. FossilOrigin-Name: 04a05c83f58784df438dc6614f7920f782bf7c1ed4f6d101c03b6573cfde06ee
* Add NEVER macros to error-detection branches that were made unreachabledrh2020-01-03
| | | | | (as far as I can tell) by check-in [ceacc28b03580334]. FossilOrigin-Name: 7b62555e285f32d354df7746ef8dce16856c6d9d53a02d895b74ba02362d2968
* Improve a specific case of early database corruption dectecion in the b-tree ↵dan2020-01-03
| | | | | layer. FossilOrigin-Name: ceacc28b035803342764f9b696c1e80edcd259b87ea4fb46f92963d6cb33de3e
* Do not allow triggers that run as part of REPLACE conflict resolutiondrh2019-12-29
| | | | | | | during an UPDATE to modify the the table being updated. Otherwise, those triggers might delete content out from under the update operation, leading to all kinds of problems. Ticket [314cc133e5ada126] FossilOrigin-Name: db4b7e1dc399c1f16b827ac087aa37c0815f4b2f41f1ffad59963eead2ab5562
* Add the OP_FinishSeek opcode which completes an OP_DeferredSeek if the seekdrh2019-12-29
| | | | | | | | has not already completed. Also add the sqlite3WhereUsesDeferredSeek() interface to the query planner. The UPDATE implementation adds an OP_FinishSeek before running the final OP_Insert if one is needed. Ticket [ec8abb025e78f40c] and also an assertion fault reported by Yongheng. FossilOrigin-Name: 21ef6e99331210b80fa7c71b4f02e8f768a748d01aef884368af2f6b51a067e0
* Early detection of database corruption in balance_deeper().drh2019-12-23
| | | FossilOrigin-Name: 61c2233654158e65a3d3baeea947903a919a569fcc4a5b342b2e9a68cec1b6f3
* Fix an assert() in btree.c that can fail if an INSERT is attempted ondrh2019-12-20
| | | | | a corrupted database while in PRAGMA writable_schema=ON. FossilOrigin-Name: 07beb3629e648e7feae4e786191514339ac1d8f6ba5bb6e7cc8a04bc1f1cd6ab
* Revise the SQLITE_OPEN_NOFOLLOW so that it actually uses O_NOFOLLOW in thedrh2019-11-22
| | | | | | | | open() system call. This backs out the SQLITE_ACCESS_SYMLINK value but adds the new SQLITE_OK_SYMLINK return code from the xFullPathname method of sqlite3_vfs when that routine resolves symbolic links. O_NOFOLLOW is always included in open() system calls for journal files. FossilOrigin-Name: 6a64fb6a2da6c98f1e87b55ad5689967e1db4eae2e08345471d95e28cd567e0f
* Fix an assert that can fail if the schema is corrupt.drh2019-11-17
| | | FossilOrigin-Name: ed57c48e4bb337810521bda2da79614313e4835a317ca4eadb52bd67e4eadf98
* Performance optimization in sqlite3BtreeCursor().drh2019-10-25
| | | FossilOrigin-Name: ea068b099c96b8b9526114732d2a6be186cf381b7329d102778ad25b95510c9e
* Faster response to sqlite3_interrupt() in the OP_IntegrityCk and OP_Countdrh2019-10-11
| | | | | opcodes. FossilOrigin-Name: bf875dc59909f9c22f7c1fc843bc4d9e5d97af5cb4ef43c4fa1d566ddfdeaacb
* Minor performance improvement for balance_nonroot().dan2019-08-24
| | | FossilOrigin-Name: d7434cae3edc321e2f1f8d340a0e656b1613b736f8400fb271a0e80f59401b9e
* Ensure that the cell overwrite optimization does not overwrite the headerdrh2019-08-15
| | | | | of the b-tree page. FossilOrigin-Name: 4cc5694cbd69749c146679c367860952fdf3f5356426ddfd1dce470569702bc1
* Early detection out-of-bounds page numbers on the direct-overflow-readdrh2019-08-15
| | | | | | optimization gives consistent error messages regardless of whether or not the optimization is enabled. FossilOrigin-Name: b517a52fa36df0a0854a75858b5e81861771d2e9032a5a0ad79aa76ae64130a2
* Make sure the btree cursor overflow cache is cleared when overwritingdrh2019-08-12
| | | | | a cell in sqlite3BtreeInsert(). Ticket [3cf9bb227e9a5d32] FossilOrigin-Name: 7dae7b969ed314605a3a2da2cfdce4d81152740f5d3bfbc2a6e311b13ee325a7
* Remove a NEVER() that is reachable from a corrupt database.drh2019-08-08
| | | FossilOrigin-Name: 30e6ee27a9fb78291c324ac9b80db4579280140430804ecd4692e312f9938525
* Improved detection of corruption on the freeblock list of a btree page.drh2019-08-05
| | | FossilOrigin-Name: 4b00799bdf107fce8a9dd84fd5bf6597e4f3373659b89aae4a1242be5964726f
* Give the SQLITE_TESTCTRL_PRNG_SEED two arguments. The second argument if notdrh2019-08-03
| | | | | | NULL is a pointer to a database connection which seeds the connection from its schema cookie. In this way, fuzzers can control the PRNG seed. FossilOrigin-Name: 49aa34480622cce4d7a72c59d9cfa8336886387acec8ee15b72f295ea1a52d8c
* Do not use the insert-overwrite optimization if the cell might overwrite thedrh2019-07-22
| | | | | page header. FossilOrigin-Name: f60a83069168899dcfd706b4d0901084c7ce92d85277950317e962a8a98ec668
* Fix an incorrect assert() in balance_nonroot().drh2019-07-17
| | | FossilOrigin-Name: 59c9e73f86b89ee17b0bce47bcb93f5b5ace5b7985678287195002afb9d40cd8
* Add new assert() statements in an attempt to help static analyzers avoiddrh2019-07-16
| | | | | false-positives. FossilOrigin-Name: 9e66458592d40fbd96ea5f21339573110ca1cfe328238a020c9420a87d35dd72
* Trivial performance improvement for balance().dan2019-07-13
| | | FossilOrigin-Name: c7920f5569022f645ec4dbfce8c228880263785c708c2c0ac065e770c438b1d9
* Initialize the 18-byte overrun area on the buffer used to reconstructdrh2019-05-16
| | | | | | overflow btree cells during a btree search, to avoid a harmless jump-depends-on-uninit-values warning. FossilOrigin-Name: 4b05caeb1b9767ba58cb4261ecc22cdd495216b3258d45f2165cdbd3ea079495
* Ensure that the BtShared.nPage value is reset correctly on a SAVEPOINT drh2019-05-10
| | | | | ROLLBACK. FossilOrigin-Name: e6d5fee8cdbdce8515957e8288e4d1e7b06f417fd3f9deeeb636fbf5b995af51
* Ensure that the sqlite3BtreeLast() interface initializes the *pRes returndrh2019-05-08
| | | | | to zero if the cursor is already sitting on the last entry of the table. FossilOrigin-Name: ebe4845cd0ffb96b30be3c69eb399d58e93149886bc2fa60a7ebd7b4fbe447a4
* Remove an ALWAYS() that was previously added by check-in [a0819086] butdrh2019-05-08
| | | | | which turns out can sometimes be false. FossilOrigin-Name: ad8fc5d8b440c49df95328df0408be699dde5a1dbd195b3f1f32e5f765578032
* Remove a NEVER() that was added in the previous check-in because it is in factdrh2019-05-08
| | | | | reachable. FossilOrigin-Name: 74eba2558a81f9e790d95a12a0c5379d4f80b43c8698ef9d6a31ff8d160a53d8
* Earlier detections of errors in the byte-offset-to-cell-content integer at drh2019-05-08
| | | | | offset 5 in the header of a btree page. FossilOrigin-Name: a0819086a521fb0ca4ffd12f959b168a89ea2e30a2844bbbd39831b2b9ecf29b