aboutsummaryrefslogtreecommitdiff
path: root/src/wal.c
Commit message (Collapse)AuthorAge
* Avoid writing frames with no checksums into the wal file if a savepoint is ↵dan2025-06-17
| | | | | rolled back after dirty pages have already been spilled into the wal file. Possible fix for [forum:/forumpost/b490f726db | forum post b490f726db]. FossilOrigin-Name: 3a3269fe8e925a522d5df9f011220a842fb15a9f56e785884e32d2e15abda5bb
* Fix harmless compiler warning introduced by the setlk-snapshot-fix merge.drh2025-06-03
| | | FossilOrigin-Name: c1f20f89d9eb3e1dd1018c0e0efe5d3043a592f078e235ad04b960334c7186c2
* If blocking locks are enabled, avoid using the busy handler when blocked by ↵dan2025-05-30
| | | | | another process running recovery. FossilOrigin-Name: a35236757ab57c4c9b34e47c5dbc10d8f1220f8152955f5303cf9c3902ee169b
* Clarify and reduce redundancy in an assert() in walChecksumBytes().drh2025-03-24
| | | FossilOrigin-Name: 3c53abf5e6df446d569040042363265737aa10fc8aaa20b31c587100c557c5e7
* Make use of the flexible-array feature of C99, when available, to try todrh2025-03-14
| | | | | | pacify -fsanitize=strict-bounds. This check-in fixes the core. There is more yet to do in FTS3, RTREE, and in FTS5. FossilOrigin-Name: 6fd6b32d06bd6a705e5140cd613af823b8183a6f6a9ceeeedfcf5e8b50821d68
* Reinstate the assert() removed by [0f6223b8]. Avoid holding a wal-mode write ↵dan2025-02-25
| | | | | lock after the transaction has been rolled back if an IO error occurs while restarting the wal file. FossilOrigin-Name: 277e150d6ab75de2407f6761aa2359df80a4e1dbce30788df06621dee05b2ef1
* Remove an assert() added by [e88212b1] that is sometimes false.dan2025-02-25
| | | FossilOrigin-Name: 0f6223b8f6c044db687f78e19f6373d0dda9155445c511a297efa05bac3b16e5
* Merge latest changes from trunk into this branch.dan2025-02-24
|\ | | | | FossilOrigin-Name: 55324d1c862c42b95251a398c40930d9fa94debb1aec7d3d0ae734d6b17b4a59
| * Code changes that make it easier to prove that no 32-bit integer overflowsdrh2025-02-17
| | | | | | | | | | | | happen during memory allocation. No problems fixed; this change is just to make future maintenance easier. FossilOrigin-Name: 215650a5a1d55bdbca9c92524804a1a54456a17f42a17e53747b21a6507506f5
* | Fix a problem causing the write-lock to be held when it should not be in ↵dan2025-01-30
| | | | | | | | | | some circumstances following a SEH exception. FossilOrigin-Name: 7eb5accb7cf937fc967dcd86da0af813fb18a2697348bd231fbefd3c09b930ab
* | Add the sqlite3_setlk_timeout() API. For setting the timeout used by ↵dan2025-01-27
| | | | | | | | | | SQLITE_ENABLE_SETLK_TIMEOUT blocking locks without also setting the regular retry-based busy-timeout. FossilOrigin-Name: 4a7eb492797abb47b18b7dfc557aeae43a0dea5b861efc203398d5059b10d131
* | Fix a race condition causing SQLite to use a busy-handler for an operation ↵dan2025-01-24
|/ | | | | that should not. FossilOrigin-Name: 6ab9ed8eef77781898375038ab05fc6e5f46b745e4906691393b8b1d90570eb6
* Code formatting changes to make trunk more like wal2.drh2024-12-16
| | | FossilOrigin-Name: 8f725472b0fe62359a4cd3237b43d7b834e042d8ce425abde06e3ed6c62dbafa
* Remove unnecessary end-of-line whitespace.drh2024-12-16
| | | FossilOrigin-Name: ae580443d210811c12209866112fc8b0b83281e24945504b748a17d93ad84062
* An assortment of comment typo fixes discovered by aspell. Add several new ↵stephan2024-10-19
| | | | | words to tool/custom.txt. No code changes. FossilOrigin-Name: 59b76a99e4a28f4cc8c4f9f39ff6e039c4d29cb7b44183f1902b5792638656d2
* When possible, avoid taking wal file read-lock 0 in sqlite3_snapshot_get().dan2024-09-26
| | | FossilOrigin-Name: 34b6ac3d76dbc6819778ec2a0f81cbcdcc0cd1a6303381d97f1c479e4ecdd132
* Move the vfstrace extension out of src/ over into ext/misc/ where it belongs.drh2024-09-09
| | | | | | Make it part of the standard build for the CLI. Bring some of the vfstrace output up-to-date. FossilOrigin-Name: 055b97de8d2397987d72dbab1cde78ece2d1c066e95042b4ed6b7b36b2cf9006
* Put an SQLITE_ENABLE_SETLK_TIMEOUT branch inside the appropriate ifdef withdrh2024-01-09
| | | | | | an assert on the else since the condition is always false if SETLK_TIMEOUT is not available. FossilOrigin-Name: d81e7a036ac5d70b6a6ee6ab7d81e041c1f5fc04b70bcee47e203d521caf7e93
* Ensure that SQLITE_PROTOCOL is not returned too early when a ↵dan2024-01-06
| | | | | SQLITE_ENABLE_SETLK_TIMEOUT build fails to open a transaction on a wal mode database in cases where blocking locks are not being used. FossilOrigin-Name: b934a33671d8a0190082ad7e5e68c78fe0c558d102404eafc1de26e4e7d65b92
* Adjust the sqlite3PagerDirectReadOk() routine (part of thedrh2024-01-02
| | | | | | SQLITE_DIRECT_OVERFLOW_READ optimization) to use less code and to be more easily testable. FossilOrigin-Name: eed670ea2a9424f7df4eeb01c152fc38f7190a5e39aa891651b28dc91fcdc019
* In SQLITE_ENABLE_SETLK_TIMEOUT builds, use blocking locks in place of ↵dan2023-11-28
|\ | | | | | | | | sleep() calls when opening a read-transaction. FossilOrigin-Name: 4c055b7a6e4533e1e571773456226ca7038ce372df3eedbbbcd9a81e8652a6cf
| * Handle an SQLITE_BUSY_TIMEOUT error if one occurs while attempting a shared ↵dan2023-11-28
| | | | | | | | | | lock on a read-lock slot. FossilOrigin-Name: 5fbf3906d272df3eb981f67455eb35f649ad2774cba9fc3f077b28d9bef3f0cb
| * Have SQLITE_ENABLE_SETLK_TIMEOUT builds block when locking a read-lock slot.dan2023-11-27
| | | | | | FossilOrigin-Name: f797baf47cf7859cfd8ce248f4f3087af4551a7040af990333426e5a7c269504
| * In SQLITE_ENABLE_SETLK_TIMEOUT builds, use blocking locks in place of ↵dan2023-11-27
|/ | | | | sleep() when opening a read-transaction. FossilOrigin-Name: a51ef39998e25e86bd0600e71d15011b12e05f4319608018293bdaecb09e8c97
* Changes so that if SQLITE_ENABLE_SETLK_TIMEOUT is defined as 2 instead of 1, ↵dan2023-11-15
|\ | | | | | | | | all blocking locks are taken for a single millisecond and the default busy-handler invoked as normal. FossilOrigin-Name: 79e24ec3dd40373bbb93792829b18d9ef40daf19d4606174e36c8e19e61a7529
| * Passive checkpoints do not use the busy-handler. So, in order to minimize ↵dan2020-06-29
| | | | | | | | | | visible changes for legacy applications, do not enable blocking locks for passive checkpoints. FossilOrigin-Name: 9c2b4bdd03716bf492ba85198717f3084ebf187bdb068893bd1ff8662362df89
* | Avoid blocking as part of passive checkpoint operations, even if ↵dan2023-11-08
| | | | | | | | | | SQLITE_ENABLE_SETLK_TIMEOUT is defined. FossilOrigin-Name: e5ecc404cae1ce8b639d0263fa07571c066f11bfc62f5ba331ad7ae138e78572
* | Fix a possible UAF in SEH if an exception occurs at an inopportune momentdrh2023-08-17
| | | | | | | | | | during WAL processing. FossilOrigin-Name: 91b91037e348fa10cf6a9d8a0ffbfdebb4a40e0e336b65b112ed1c828e75cda7
* | Fix a problem in sqlite3_snapshot_recover() introduced by the ↵dan2023-08-14
| | | | | | | | | | [8a6b0c24937e855b] merge. FossilOrigin-Name: c2577eb0a4a627c65d675f1446514843486092be9cb271b682793a0107e496cd
* | Add a comment describing the contents of the ExceptionInformation[] array ↵dan2023-07-26
| | | | | | | | | | for win32 EXCEPTION_IN_PAGE_ERROR exceptions. No changes to code. FossilOrigin-Name: 8e20354242d5f34a90b6c00d9034535ef6f6086ee4971230c7fd69985e2777d2
* | Update the latest trunk enhancements into the wal-shm-exceptions branch.drh2023-07-24
|\ \ | | | | | | FossilOrigin-Name: 3187ee3f69fc28a259ba0e951ac10a65c07ef2c3866acbefaf9544333a930cc6
| * | Reduce divergence between branches: trunk and wal-shm-exceptions.drh2023-07-11
| | | | | | | | | FossilOrigin-Name: d38ed6b1fc6b572997d520c36f256c11404fb1bd5f28acab07466bfc96554a8f
* | | Get fault injection for testing working correctly. Other code clean-up.drh2023-07-11
| | | | | | | | | FossilOrigin-Name: ff492277ed00c1f637a5b4ccd6d8193ea22f6781f90073861588a2b7d5c045b7
* | | Fix a warning. Unclear yet if the code is correct this way or not.drh2023-07-10
| | | | | | | | | FossilOrigin-Name: 2df4fd76ef48bb63389df8d783059af6b8f2cbb2c11d07953b408e71f50b625b
* | | Merge the latest trunk enhancements into the wal-shm-exceptions branch.drh2023-07-10
|\| | | | | | | | FossilOrigin-Name: f655d08d019bab0c578886e91ca24fd956d1b3dea9b9c9104812b3cf62e5e556
* | | Merge all recent trunk enhancements into the wal-shm-exceptions branch.drh2023-07-06
|\| | | | | | | | FossilOrigin-Name: e59cea2d851be68559e7d01a01cb05684c44d151d022ea9790ce99671016ab00
| * | 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
| * | Add a comment to the [0512f82a2cde7447] change to link it to its TH3 test case.drh2023-05-03
| | | | | | | | | FossilOrigin-Name: 1281d4d9d799ef83e6eb51d656ede82b4503d39adf169deb936b30ebfddd88b1
| * | If the page size is wrong on the page1 content inside a WAL file, thendrh2023-05-03
| | | | | | | | | | | | | | | | | | | | | running VACUUM could trigger an assert(). This check-in changes that assert() into a branch that returns SQLITE_CORRUPT. [forum:/info/4ef9b37d74d2d2e8|Forum post 4ef9b37d74d2d2e8] FossilOrigin-Name: 0512f82a2cde7447cb348d9fd620f39f2f0e359141903cde20f7ba30b5d34af3
| * | Unwrap the loop in the WAL hash function.drh2023-04-12
| | | | | | | | | FossilOrigin-Name: eb94ae13206762a42ddad12e0d1461df83e9759e44a369f188cd3aad82f211c4
| * | Back out the optimization at [1a8c2e54375ee2cf7] because there are somedrh2022-07-11
| | | | | | | | | | | | | | | cases where it does not work. FossilOrigin-Name: fe39c8d5fd813308fb27a05ce257ff003d3c09c0372f500e8def5a528a2558b7
| * | Size reduction and performance optimization in sqlite3WalFindFrame().drh2022-07-04
| | | | | | | | | FossilOrigin-Name: 1a8c2e54375ee2cf73773b798fed0ae07b42f5e068fddc513c093de5c1f46615
| * | A better and more robust fix for the problem of reading a read-only WALdrh2022-01-20
| | | | | | | | | | | | | | | mode database with existing -wal and -shm files, replacing [f426874e005e3c23]. FossilOrigin-Name: 71bfd0b57ab197405606b8096b8521d784ff174c4eecf1d9804d38342c03cc80
| * | Fix the ability to read read-only WAL-mode database when -shm is present,drh2022-01-20
| | | | | | | | | | | | | | | | | | ([00ec95fcd02bb415|check-in 00ec95fcd02bb415]) so that it works for the case of 64K page size. FossilOrigin-Name: f426874e005e3c23e8a00083b7c201408e072bca413e52bfc436da6483afb0cd
| * | Fixes to internal comments. No changes to code or documentation.drh2021-11-26
| | | | | | | | | FossilOrigin-Name: 1489b196ce82cddf7360aff6c89219ca25e666187f0f5ff6419ba3b504cdef8d
| * | Ensure that all possible outcomes for walIndexPage() are accounted for bydrh2021-10-27
| | | | | | | | | | | | | | | callers. FossilOrigin-Name: 12715c6b234a04627ca27e94bfa8bd456998360a9f0117480e0038f4747818d6
| * | Avoid the 1-based indexing on the WalHashLoc.aPgno[] array. Make it 0-indexeddrh2021-10-27
| | | | | | | | | | | | | | | instead. FossilOrigin-Name: 28f5f709b4b28ba7f6f56bdd4a9e8c04d0d2df90d13d6df1a589fa4a65163f4d
| * | Improve the comment on walIndexPage() to more accurately describe thedrh2021-10-27
| | | | | | | | | | | | | | | post-conditions. FossilOrigin-Name: b619e936455f4001b543a9a58dea2ac9ebd598327d6be01130ca6e7e9764ffe6
* | | If an EXCEPTION_IN_PAGE_ERROR exception is caught, make the underlying OS ↵dan2021-09-10
| | | | | | | | | | | | | | | error code available via sqlite3_system_errno(). FossilOrigin-Name: fdb20e9ee48465b94aa6ac3c5e263ecaa7c3b10f4a193e79f965b7c35944b08b