aboutsummaryrefslogtreecommitdiff
path: root/src/btree.c
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
* Fix harmless scan-build warnings.drh2023-07-08
| | | FossilOrigin-Name: beab3c98639be531744e60440223bb9ee76bc15234aff05e5efb273c8241dfd8
* Simplification to the getAndInitPage() routine that results in improveddrh2023-06-22
| | | | | performance. FossilOrigin-Name: 2e9734c2335d8c06fedc9f4cca02baaf326f7fa276bd464f3214f383715a48d6
* Improved comment on the getAndInitPage() in btree.c. No code changes.drh2023-06-21
| | | FossilOrigin-Name: dc468cfdb825083b3a4b6cb95c913961e9312e22103c5a0cd923b75c83c65e13
* Address various harmless compiler warnings fromdrh2023-06-16
| | | | | [forum:/forumpost/d526da8ee4|forum post d526da8ee4]. FossilOrigin-Name: 365caf2f97e8f15842f52536e8d05d359e9d6e863182e020ce14a9a9f27ee057
* Check-in [70e12efd1b189560] left a path through lockBtree() that failed todrh2023-06-12
| | | | | | set the BTS_PAGESIZE_FIXED flag. That omission is fixed by this check-in. dbsqlfuzz 02c9ab74eb0619c9ae3b894ce157fae1d7f94645 FossilOrigin-Name: 30dcc872eb1c9549708009c86357826c4f15ffa17e379dab5cd4aec596643728
* Defer setting the BTS_PAGESIZE_FIXED flag until after we are certain theredrh2023-06-10
| | | | | are no errors and the page size has been set. FossilOrigin-Name: 70e12efd1b189560e07f59db03a20b8c1ab19224aae4fc3d7c0bdfd2568064ea
* Simplify a memcpy() in defragmentPage(). It now might copy more content thandrh2023-06-09
| | | | | | | | | is strictly necessary, but runs faster and uses less code space. Possible reasons for the improved performance: (1) the copy is now always 8-byte aligned, (2) fewer intermediate results are required which means less register pressure which helps the compiler to optimize the subroutine. FossilOrigin-Name: 6e5607ae4d872954483a8d7a5c866aa41e4af70fae9652fb7eb211b316ab724d
* Fix straggler misspellings and tidy the custom dictionary. Also include ↵larrybr2023-06-07
|\ | | | | | | | | pickups from [forum:/info/c61fb09afd|forum post c61fb09afd]. FossilOrigin-Name: 8c291d99946eb32b20b743921202f9c7cfb716268ff526817b27adbb7942e40b
* | Add a C-source spell-checking facility. make misspell (on Nix)larrybr2023-06-07
|/ | | FossilOrigin-Name: 26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
* Fix incorrect b-tree root page reports from the enhanced PRAGMA integrity_checkdrh2023-05-18
| | | | | output introduced in version 3.42.0. FossilOrigin-Name: 9b538f62539bcde7d7d7ad06eccdc558ecbd3f9160db35197568f4d3b4247c76
* Fast-path the btree transaction start for the common case where adrh2023-05-17
| | | | | transaction is already active. FossilOrigin-Name: 798c3ff20c606b5f9fde16dc67781f238370a7c450bc239c3a98d0f4ca370399
* In editPage(), if an attempt is made to edit an empty 64KB page, then takedrh2023-05-08
| | | | | | | the slow path through rebuildPage(), in order to maintain strict invariants in the editPage() code. [forum:/forumpost/0f37727c0d|Forum post 0f37727c0d]. FossilOrigin-Name: a865e574e510c1ca192d0bd5293fb583def90f7ed086af2c89ca856ce93d115b
* Fix harmless compiler warnings.drh2023-05-01
| | | FossilOrigin-Name: 342af5b4fa0bd7c699e5497161db13d0cf795c7a5875ae30d666122e518f213b
* Fix an incorrect assert() statement in btree.c as found bydrh2023-04-22
| | | | | [forum:/info/d03345d572713fe6|forum post d03345d572713fe6]. FossilOrigin-Name: cd485b302c54aef066d751a153df34eea0cd23e54a414e291f636ad9929fe78a
* 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
* Guard against oversized cells in the newly enhanced pageFreeArray().drh2023-04-07
| | | FossilOrigin-Name: 2dcdbb50356edbd3a79e53fa0bee4e700c2bdea78e27173b62ddabe44b066726
* Add NEVER on an unreachable branch.drh2023-04-07
| | | FossilOrigin-Name: 9b3febbd988be05807ada20146d3e196ae17c966722fff049feb32292157bff2
* Fix an assert().drh2023-04-07
| | | FossilOrigin-Name: 7eff46ba97dd8a3d6a5d01d5d61e98a2805deceafa47335eded7d784a8304525
* 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
* Small performance improvement in freeSpace().drh2023-04-07
| | | FossilOrigin-Name: 8dc5292ee592f16451441e33ad0800ba10a21ecd63f1f9926d6915a59a1552d3
* Increase the size of the cache of free blocks inside of pageFreeArray() todrh2023-04-06
| | | | | reduce the number of calls to freeSpace(). FossilOrigin-Name: 27c59f1ea789f3ff245f23e79ded5cd71c48e3a51ffbb8c220b51101a4e69fd7
* Stronger constraint checking in allocateSpace().drh2023-04-03
| | | | | dbsqlfuzz 93d4c9ff5ef7cd29f16e767af1ee71c29ec5a4c0 FossilOrigin-Name: 9e968f4fbce061190f10f31ce9d3eb4fce6706ea6b7e5011bfa1e893d37ca68d
* Earlier detection of corruption in sqlite3BtreeDelete().drh2023-04-02
| | | | | dbsqlfuzz a4c48c291d6e40157a1b749a05eaa7c7faf5a625. FossilOrigin-Name: 978dc71c388b37740da38c310674315c7d7fe814d1daa16a146b4df71385d1e1
* Improved error messages from PRAGMA integrity_check. Identify the root ofdrh2023-04-01
| | | | | | the tree when a problem is found in a b-tree, making it easier to track the problem to a specific table or index. FossilOrigin-Name: a1cb152e69c7c6cdd99300c91a8104716089de459d9d19e33ef38432aad70908
* In the b-tree module use %u instead of %d to print unsigned quantities suchdrh2023-04-01
| | | | | as page numbers and offsets. FossilOrigin-Name: 33ac62d8eec56eb71f20ccd28a5d6e4e8051522feb2db0199abee9e18ce1f64e
* Minor change to btreeNext() to facilitate coverage testing.drh2023-03-20
| | | FossilOrigin-Name: 20b3ef04d8c79e281e32676d57c7a8569fac9e782ca24337691d44d383eff7bb
* Fix a problem causing a cursor to retain an out-of-date cell-info cache when ↵dan2023-03-20
| | | | | processing a DISTINCT query on values that are identical according to their collation sequence, but different on disk. [forum:/forumpost/e132e6cde44fb505|Forum post e123e6cde4]. FossilOrigin-Name: 1b3abc1daeac29714256b5a1d5a07a75dc986f1089054a8bee44a00583b7383a
* Remove a NEVER() from btreeNext() that dbsqlfuzz ↵drh2023-03-16
| | | | | | | | 460aa158f9a2c41145831cc924296cde1f312b3f found could sometimes be reached. I will find a way to test that branch later. FossilOrigin-Name: 1dffeffe150fff6777cf26bc960326ca4e4190d25d05bb066b082d1e1c8eb374
* Performance optimization in the varint decoder for the cell parser.drh2023-02-28
| | | FossilOrigin-Name: b2b91c7cb40f1efe800059614e34823411016a3ece3f988e1574aecadd4c3114
* Split out a new variant of cellSizePtr() that applies only to leaf pages,drh2023-02-25
| | | | | for a small performance increase. FossilOrigin-Name: 22d32eef8741ae4f2aac3869465e5a7d2e33c6bc2425dd8e77f2a746e43687e8
* Remove an unnecessary and redundant corruption checks in defragmentPage().drh2023-02-25
| | | FossilOrigin-Name: 2dc7342e12e9dac2d8345d045a17caa29c26eaf6f417dd052c7c645eddd6c58c
* Add an assert() to help static analyzers.drh2023-01-27
| | | FossilOrigin-Name: e446c8b4aa2ffe075f9c289c771d62a414661c3ffe6abae5649c50af8e32fab6
* Improved progress-handler and interrupt detection during PRAGMA integrity_check.drh2023-01-11
| | | FossilOrigin-Name: 6db42780a9e530bcc94490cc6080536309666dc13523272d1799d6661137e908
* Small performance improvement in the btreeOverwriteCell() routine.drh2023-01-03
| | | FossilOrigin-Name: df5ea47130d275e9fa1bd6aa8d55f1d5e136cba30ba13b7ede22224aa7f78919
* Check-in [8d5b76593d82b3a5] contained an error that was causing some obscuredrh2022-11-28
| | | | | error codes to be lost. Fixed here. FossilOrigin-Name: 46cdd3637d6a206ad2bcf8653cc6f2c7a886a16cc7685c45967938609941a755
* Fix harmless compiler warnings.drh2022-11-28
| | | FossilOrigin-Name: 8d5b76593d82b3a57bc904ced33c24cd49369868b5dd2fe7f2c7b114f5aee2f6
* Add the SQLITE_FCNTL_RESET_CACHE verb. Use it to ensure that the page cache ↵dan2022-11-28
| | | | | is purged before and after a the recovery extension is run. FossilOrigin-Name: 6db0bc4bc0d272b610bef2aeeae43f539ed6e7cc0a9cc767d5af85ecb0019d5f
* Performance optimization and size reduction in insertCell() by omittingdrh2022-11-21
| | | | | the "pRC" argument and instead returning the result code as an integer. FossilOrigin-Name: bee94d1bb0daade023cc1e274339daafc249e1978c0765fc45042b5f9060e478
* Performance optimization to sqlite3BtreeInsert().drh2022-11-21
| | | FossilOrigin-Name: b8976ebfe03fbc1e09a38d598a62493a7f19ff7a2a3acd1ec54d0dee190471e9
* Small performance improvement in sqlite3BtreeTransferRow().drh2022-11-21
| | | FossilOrigin-Name: dab959ea3edf99788bfd76352cd46a3e56876b0e7d7008c6927aa14534853c50
* New assert()s confirm that BTREE_PREFORMAT must be the same value asdrh2022-11-19
| | | | | OPFLAG_PREFORMAT. FossilOrigin-Name: f40bf2c642643ae61d331e8d4815f601224fa258ab34344c6756966163a89f4a
* Performance optimization in sqlite3BtreeInsert().drh2022-11-19
| | | FossilOrigin-Name: 9776fa31758161970a50995a487b6543ed71e9610460b7324304ef21d9248707
* Performance improvement and size reduction in balance_nonroot().drh2022-11-19
| | | FossilOrigin-Name: 715bc81eb833ad4834d139a04085e0386c54c30d7395207e48972c4dfe5879c1
* Small performance improvement and size reduction in btree.drh2022-11-19
| | | FossilOrigin-Name: daa07149c0a0fcb6a6a1ace6020ca68802588ed309f5aaaf99c871088bc46908
* Improved comments on the pageFreeArray() routine of btree.c. No changes todrh2022-11-19
| | | | | code. FossilOrigin-Name: 0c2adc6d3547b07e950ae49f07f688f71a21b3ad5a51f16f0e8d49ab91564582
* Streamline the decodeFlags() routine in btree.c for a small performancedrh2022-11-19
| | | | | increase. FossilOrigin-Name: 4cb285210b4a2b14c80962bf2ecb35be310d3444c329c15d86b3073096455704
* Small performance optimization in btree.c.drh2022-11-19
| | | FossilOrigin-Name: f710cce13577788cf3b95ed7089c3af2854271ff53f0a0b7b0619f315e331eff
* Fix requirements marks so that they match documentation corrections.drh2022-11-07
| | | FossilOrigin-Name: 10d6189d23133006b39ea230045a918483721dd48f5558f77e57e23693097d16