aboutsummaryrefslogtreecommitdiff
path: root/src/btree.c
Commit message (Collapse)AuthorAge
...
* Fix comment typos. No changes to code.drh2018-01-23
| | | FossilOrigin-Name: 8e5e74c66b9cdb348392e3db2d9f32cfa20fcec35bf09d9e1f623e7ad875ec97
* Avoid unnecessary OOM detection warnings in a debugging routine.drh2018-01-22
| | | FossilOrigin-Name: 395f8ea790e6e295800fa8927f0585b2419b9521ef4fd591d51d2a48db2a90c4
* Change the function name to sqlite_unsupported_offset(X). Only enable thedrh2017-12-29
| | | | | | function if compiled with -DSQLITE_ENABLE_OFFSET_SQL_FUNC. The makefiles add that definition to shell builds. FossilOrigin-Name: 7a7f826e324b1a2c332e2f1d0740fd0babffcaca6275a798572f02ad367b99ab
* Enhance location(X) so that it works with indexes and WITHOUT ROWID tables.drh2017-12-29
| | | | | | | The function might return an offset to the main table or to an index, depending on whether the column X would be loaded from the main table or from the index. FossilOrigin-Name: dd94d6a880dfec4bddd247239b815b84964f804d24841e25f33f1d46a4b5274d
* Add an experimental location(X) SQL function that attempt to return thedrh2017-12-16
| | | | | | | location of the payload within the database for the record that contains column X. location(X) returns NULL if X is not an ordinary table column or if SQLite cannot figure out the location because it is using a covering index. FossilOrigin-Name: 51be9558164301c5dd4df23ab8b3e67de0b522f8d36f79f3d84d45d3dc2a83a4
* Enhance the log messages produced in some cases if database corruption isdan2017-11-18
| | | | | encountered by an SQLITE_DEBUG build. FossilOrigin-Name: 23a3128083834b5fc80adf45448f7dc65587c52761fb3c9483b80313b369406f
* Take extra care to avoid an OOB read caused by a corrupt b-tree page.dan2017-10-19
| | | FossilOrigin-Name: 04925dee41a21ffca9a9f9df27d8165431668c42c2b33d08b077fdb28011170b
* Fix a typo in a numeric constant in an assert() - a bug that has been presentdrh2017-10-12
| | | | | in the code since check-in [79e22b95038] on 2010-03-30. FossilOrigin-Name: f0a2724f0a255cd5a262f31e4ee1f99ae713c25a9ecc56dc794c95f223453b9b
* Fix compiler warnings that come up with SQLITE_OMIT_WAL.drh2017-10-05
| | | FossilOrigin-Name: 8ca0fa8dfe6a66aea7fc63f15e6f704cb190aa0760a3fec2db5f6bad3861a135
* Updates to requirements marks.drh2017-10-04
| | | FossilOrigin-Name: 40964a4ef7565ea0ddf452f48cb22373d068528e07d40eefc008f2231c969422
* Fix an issue introduced by check-in [4cd2a9672c59] (2017-03-03) that coulddrh2017-09-28
| | | | | | | | allow a negative value in the 3rd parameter to memmove() when defragmentPage() is called on a btree page with a corrupted freeblock list. The corruption is now detected early and results in an SQLITE_CORRUPT return before the memmove() is reached. FossilOrigin-Name: 5b9ae693120fe4f7bc3b6270f35d773876f6cc8f5990e05cce0d255c54b36ae7
* Use the SQLITE_CORRUPT_BKPT return code in a couple more places.mistachkin2017-09-04
| | | FossilOrigin-Name: 72d22c226bf4311345e8844fd9801ebddf77aceb80a038dce46608bf4ccae636
* Add the new sqlite3PagerUnrefPageOne() pager method to deal with the specialdrh2017-09-01
| | | | | case of unreferencing page1. FossilOrigin-Name: b2e2100cf766da1cb499aec0ca0a9969d7af5d93312ab8cf895fbf4a6ffb9b2f
* Remove the rarely-used scratch memory allocator. This makes the code smaller,drh2017-08-28
| | | | | | | faster, and easier to maintain. In place of the scratch allocator, add the SQLITE_CONFIG_SMALL_MALLOC configuration option that provides a hint to SQLite that large memory allocations should be avoided. FossilOrigin-Name: 54b000246cfb5c7b8adb61a17357ef5a49adddde9e48e8937834d5ba0beb8a6b
* Convert a branch made unreachable by [59560d07] into an assert().drh2017-08-25
| | | FossilOrigin-Name: 2738b8db3caa6ce48d27cb5749d27b79241e6f6682b694886f6ef663e5443583
* Performance optimization to pageFindSlot() in the b-tree layer.drh2017-08-23
| | | FossilOrigin-Name: 59560d079fab4b91ec50855cc60349da178209c38fb6dae674ff874ccfc7f5fa
* Size and performance optimization to dropCell() and freeSpace().drh2017-08-23
| | | FossilOrigin-Name: bc1ec123ce05c9d16b0942f870381145dc9725764e47806939ff207a73066f4d
* Smaller and faster implementation of the fillInCell() routine.drh2017-08-23
| | | FossilOrigin-Name: 77074990edef6c42bdfe7ccce1affc8ed64a86dde3ad4fa50b60ba0a6d851eea
* Avoid a test for CURTYPE_BTREE in sqlite3VdbeCursorMoveto() in order to reducedrh2017-08-16
| | | | | the size and improve the performance of OP_Column. FossilOrigin-Name: f078deb25149b7b1881b7f3374b343d0677e82336d8fdd7f1cdd06d926b5dd57
* Btree optimization: New field BtCursor.pPage that points to the current page,drh2017-08-15
| | | | | saving a single pointer dereference on each access. FossilOrigin-Name: 373b71d19cad785922d5a80828f2fee0cbe7dff6594743e625bbdfa31b1ca131
* Minor size and performance optimization to sqlite3BtreeCloseCursor().drh2017-08-14
| | | FossilOrigin-Name: 16969338841734d00ab906a94b82480c7e1e426eb0ddf7b9e6aed722aee5d91f
* Change the internal btree routine moveToRoot() to return SQLITE_EMPTY ifdrh2017-08-14
| | | | | | | the table is empty or if it has pgnoRoot==0. This simplifies the callers, making them smaller and faster. The SQLITE_EMPTY result code is intercepted and changed into SQLITE_OK before surfacing in an API. FossilOrigin-Name: 240d57143d943eaddd5f7c2d473f47a1d29417e61d28142f70f3d960bb9b30df
* Fix harmless indentation error.drh2017-08-14
| | | FossilOrigin-Name: 25e92baaaeb9e8a2650b3083d3febf3661ecf1e05d9d24b26fe9f87a03bdd8fa
* Minor optimization on clearCell()drh2017-08-02
| | | FossilOrigin-Name: f3c39c2986be08683c2af4df610bc12e3c6bc6bec265c94ce01b94a950723524
* Optimizations associated with error handling in btree cursors.drh2017-08-02
| | | FossilOrigin-Name: 49ba54e26731ed371745d4bdd9dd1dfeb73357b6d206c85a4252ec866be971d0
* Fix harmless compiler warnings in the core.drh2017-07-11
| | | FossilOrigin-Name: 55e93f256018757e5e1cb3b10ef48abf5914e7687419eae58b00998a37061261
* Add the "PRAGMA secure_delete=FAST" option, which overwrites most deleteddrh2017-07-07
|\ | | | | | | | | | | | | content without increasing the amount of I/O. Deleted content might persist on the free page list, however. And extra CPU cycles are used for zeroing, of course. FossilOrigin-Name: 38978ce65b280bb7cba3fc08ba91485fb1b84cd9fbba2e950ecf41c021ff452a
| * Experimental "PRAGMA secure_delete=FAST" pragma. The intent is to overwritedrh2017-06-19
| | | | | | | | | | deleted content with zeros without increasing the amount of disk I/O. FossilOrigin-Name: f1682f0faf1a93ded066464b1ddd5f987e21ee0f6bb5e828ed31c3ad903cf2c3
* | Add the SQLITE_DBCONFIG_ENABLE_QPSG option to activate the query plannerdrh2017-06-26
|/ | | | | | stability guarantee. This involves refactoring the sqlite3.flags bitvector to carve out a free bit to use. FossilOrigin-Name: 7076e8283ebae1b45a5d85d9538b49b6da399d38c3c6935de100f948f814f6a9
* Fix a potential null-pointer deference following OOM introduced bydrh2017-06-11
| | | | | check-in [e39795d7] (unreleased). FossilOrigin-Name: a2f77285fa44df86863eed576271f1030ec60f15480daf175908c5082c27774b
* Ensure pointer map entries are always added when a row that does use overflowdan2017-06-08
| | | | | | pages replaces one that does not in an auto-vacuum database. Fix for [fda22108]. FossilOrigin-Name: b30dfba811cb531b09ff2e71a1a18ed53c816cb39155dd52ca3e2701425fe17b
* In SQLITE_DEBUG mode, attempt to log the page number of the database thatdrh2017-06-07
| | | | | contained the problem when SQLITE_CORRUPT errors are seen. FossilOrigin-Name: e39795d7d798d5249c7bd2a0f6ff891b455f4300a3d638c39a4668323b367666
* Change sqlite3BtreeNext() and sqlite3BtreePrevious() so that they returndrh2017-05-30
| | | | | | SQLITE_DONE if they have already reached the end (or beginning) of the table. This gives a performance increase and size reduction. FossilOrigin-Name: e972a3860892022d57b26ec44ce0fbadc61c1ff54b7a10b7e82390db88d323a7
* Small performance increase and size decrease in the btreeInitPage() routine.drh2017-05-25
| | | FossilOrigin-Name: 6f415833e0554706dcf04f68ecba4ca2e54c08f3bbf6a1dba182bb132c912a2e
* Enhance "PRAGMA integrity_check" to detect duplicate rowids within a leafdan2017-05-01
| | | | | page. FossilOrigin-Name: adcad37b001d255299be716b16003b56ec1fba349ef73261ee0e543186c4f311
* Clear the BTCF_ValidNKey flag set if a cursor is moved bydan2017-05-01
| | | | | sqlite3BtreeInsert(). Fix for [f68dc596c4]. FossilOrigin-Name: a6727eef6d757a39ad23e5c8cbe960f5d909e5d37cb4e90bc3bdbb8bf58cd6f8
* When building an ephemeral table of integers, do not assume that the tabledan2017-04-24
| | | | | | does not already contain N if the insert cursor points to N-1. Fix for ticket [61fe9745]. FossilOrigin-Name: 1c1b0862236f564283be08338790d6494e705f1198547a59499e3f8c07f2cd99
* Save a 78 bytes of code space and a million CPU cycles in speedtest1 bydrh2017-04-01
| | | | | | storing the cell index for the leaf page in the BtCursor object in its own field (BtCursor.ix), rather than as an entry in the BtCursor.aiIdx array. FossilOrigin-Name: 2452f0617d1085689264b5f66681788cfe9e3b1a7b318307c93942b702a443df
* Avoid unnecessary blob handle invalidation when changes are made to andrh2017-03-29
| | | | | unrelated table. FossilOrigin-Name: 4a01880b62706c12d6f16f7c2b5c8b0dc67a9a8a0a48c5b42451e1a133e85611
* Fix a typo causing the build to fail if ↵dan2017-03-16
| | | | | SQLITE_DEFAULT_SYNCHRONOUS==SQLITE_DEFAULT_WAL_SYNCHRONOUS. FossilOrigin-Name: df39adeaa4d73a3d4ec831843b8ec7fd449f8b2137bdc7d7c320958d00e98db6
* If the user has not set it explicitly, set the "PRAGMA synchronous" setting todan2017-03-16
| | | | | | SQLITE_DEFAULT_SYNCHRONOUS when a database connection changes from wal to rollback journal mode. FossilOrigin-Name: 78030c0f52aa39fb2ab32c75c56e6bcefe6382b8df28b1909e3c911e42dbeca3
* Merge updates from trunk.drh2017-03-06
|\ | | | | FossilOrigin-Name: 5f7fc79aa06ca9b79664c50c3c277c98a74ff9a0
| * Fix a case introduced by [4cd2a967] where a corrupt database could cause a ↵dan2017-03-03
| | | | | | | | | | buffer overwrite. FossilOrigin-Name: 5d0455fece514552ad7f283d56526f53d7c688bd
* | Merge recent trunk enhancements.drh2017-03-02
|\| | | | | FossilOrigin-Name: c60cdb47612c05c252613e50a8ac10635469fdfe
| * Tweak the code on this branch to detect b-tree page corruption in the same ↵dan2017-02-25
| | | | | | | | | | cases as the trunk. FossilOrigin-Name: f9863b39d96dce6cb5e49a5f3a445ff3d897a951
| * Optimize defragmentPage() in the case where the page contains either one ordan2017-02-24
| | | | | | | | | | two free-blocks and a small number of fragmented bytes. FossilOrigin-Name: 202b1c0276aec6b8da64d3277de1ad91c9d62d80
* | Add two NEVER() operators in the sqlite3BtreeRowCountEst() routine.drh2017-02-23
| | | | | | FossilOrigin-Name: 7a959f6d1ea038988cdb4c02d6f37abaec2580a0
* | Fix errors in the table resize detection.drh2017-02-18
| | | | | | FossilOrigin-Name: 4229caec0b60a1617b9d5ff94b47271cbd7be1e0
* | The analyze_as_needed pragma now responds to table size growth and willdrh2017-02-17
|/ | | | | automatically rerun the analysis after each 10x size increase. FossilOrigin-Name: bfbdd07409688fac4ccddbab3639745f6152e23d
* Change all legacy instances of "#if SQLITE_DEBUG" to "#ifdef SQLITE_DEBUG" fordrh2017-02-13
| | | | | consistency. FossilOrigin-Name: 670f10b24230863688270d12ac519609ade2302b