aboutsummaryrefslogtreecommitdiff
path: root/src/wal.c
Commit message (Collapse)AuthorAge
* Reduce divergence between branches: trunk and wal-shm-exceptions.drh2023-07-11
| | | FossilOrigin-Name: d38ed6b1fc6b572997d520c36f256c11404fb1bd5f28acab07466bfc96554a8f
* 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
* Enhance the wal.c source file with an ASCII-art schematic of the -shm filedrh2021-07-29
| | | | | header. FossilOrigin-Name: a6c160e08a61d105f8aab959440ac5ec4f1aaca8f0d393e08e7c2c67815b5bb2
* Fix an error in one of the assert() statements added by [23b08fe9db24a953].drh2021-07-29
| | | FossilOrigin-Name: ad24334bc06dc9ae52825a1873a1eab6c258d77fcc00dec55884ddddecd9932e
* Improve comments and add new assert() statements in WAL to help documentdrh2021-07-29
| | | | | how everything works. FossilOrigin-Name: 23b08fe9db24a953cc231b093cf74d140c9965d22964d0401ff8ab3d4ecba443
* Fix a harmless "unused variable" warning when compiling withdrh2021-04-30
| | | | | -DSQLITE_COVERAGE_TEST. FossilOrigin-Name: 0bef3fb11fb95d7ede82b59aea26e99e2e23b3bce48009181e691ea17ae78a61
* Modify a test for corruption within the wal checkpoint code to account for ↵dan2020-08-11
| | | | | the pending-byte page. And for the fact that test configurations might move the pending-byte page. FossilOrigin-Name: 7dfb74c37e678dde347d9d85846672f82ad282e300e32676330b764be2e4d580
* Do the oversize-WAL corruption test before the size hint is issued.drh2020-08-07
| | | FossilOrigin-Name: fdc5fb902d7f2d10f73e64fe30c67153b59b26c5d707fc9c354e90967dbcc214
* Return an SQLITE_CORRUPT error if the final expected size of the database ↵dan2020-08-07
| | | | | when checkpointing is not reasonable - where reasonable is defined (basically) as the sum of the sizes of the database and wal files. FossilOrigin-Name: e2799563c8a97f617c6d932719b312e3d5bff051a9a397492df8d88e8bb4260a
* Provide an alternative "guaranteed-safe" method for overwriting the WAL indexdrh2020-07-30
| | | | | | on recovery, in case some platform is found for which memcpy() cannot do this safely. FossilOrigin-Name: 168cccbabbd4807bdb04953f395cd1a245c46e9d4816a09c9d024ecd5432759d
* Fix signed/unsigned compiler warnings.drh2020-07-29
| | | FossilOrigin-Name: 1d69eee8b085d514f442840346f001b4785f8ec64f5ba66943e9577b26e2e29c
* Add an sqlite3FaultSim() to make an OOM case more accessible and removedrh2020-07-28
| | | | | the ALWAYS() on the conditional that is false when the OOM actually occurs. FossilOrigin-Name: 2a251af84ff1f5ca281aa69c5410d6ae7aa5a85ef47149909a297525e1651e9d
* On recovery, always overwrite the old with the new, even if they are the same.drh2020-07-27
| | | | | | Add ALWAYS() macros on branches currently thought to be unreachable, pending additional testing. FossilOrigin-Name: 7052cf1d533f6404d0f45cf0b3e8a11c1ee27eccb64680a7fd308c8da7cbd544
* Improved error reporting if walLockExclusive() fails.drh2020-07-27
| | | FossilOrigin-Name: cf962d213abe1b55ebbcfecf1de9d5d61709509d1ce3cbd56d8cf4c9ad65e5a9
* Allow a wal mode recovery to proceed even if there are readers.dan2020-07-25
| | | FossilOrigin-Name: 74374aebf9abf3d6b6a3920967a079ceaa4c6276dc6c177682742c2be405b7b7
* Use AtomicStore() to set values in the wal-index hash table.dan2020-06-04
| | | FossilOrigin-Name: 1ab30c75f2fe14d1ee77d0eace4e29ba8f805d63e2da0897b111ea1311f409aa
* Make sure variable declarations are at start of scope even whendrh2020-05-25
| | | | | SQLITE_ENABLE_SNAPSHOT is used. FossilOrigin-Name: a77ceaf6ba934b1d73c90b8980191a65d02ad6ce1e11e6baf573b3a132685545
* Add compiler hints to disable TSAN for the routines that access the -shmdrh2020-05-19
| | | | | file header in WAL mode using a double-read with memory barrier. FossilOrigin-Name: 3117c1b5a9e348fd8d16ba9d03fdafaad8514567fb3403f72b86d6162ad40bde
* In wal.c, improved comments on concurrency issues. More use ofdrh2020-05-19
| | | | | AtomicLoad() and AtomicStore(). FossilOrigin-Name: 4bf566feca3a8fbe5e386533aac30e0ac25836cfc820a3abd91e156bd6198b4a
* Use the sqlite3Realloc() interface internally, rather than the publicdrh2020-05-17
| | | | | | sqlite3_realloc64() equivalent, to avoid unnecessary calls to sqlite3_initialize(). FossilOrigin-Name: 1313557b512297e7b75ed748894379b2022aecf696d5a58318e46a668321c1ff
* Use AtomicStore() and AtomicLoad() in a few more places to avoid a ↵dan2020-05-13
| | | | | theoretically undefined behaviour. This is not actually problem on any known hardware. FossilOrigin-Name: fda57d4d2f1499c861d43026aa9362d1a30d67c9c002ebf5b0cdc25251537fbb
* Fix an assert() failure that could follow an IO error.dan2020-05-06
| | | FossilOrigin-Name: e89c864299024cdce395a15c19b000b976142b9eed267901a288adaa695f9e65
* Fix harmless compiler warnings.drh2020-05-06
| | | FossilOrigin-Name: 92dc59132f8547635d73c61c21ea29b380c401ddc84a6d01412808e00386b9e8
* Add error code SQLITE_BUSY_TIMEOUT, used internally by the OS layer to ↵dan2020-05-06
| | | | | indicate that a call to xShmLock() has failed due to timeout of a blocking lock. FossilOrigin-Name: f3ef9c7c2b4ba3de1057ad569f068b241d5f23e6629d8e0dacf85e57fd13b8aa
* Fix compiler warnings in non-SQLITE_ENABLE_SETLK_TIMEOUT builds.dan2020-05-06
| | | FossilOrigin-Name: 22de99ef410ba2a540871f3e61157d8dc4b969416f14808aeca73971b17fcd51
* Block on the WRITER lock when attempting to run recovery.dan2020-05-06
| | | FossilOrigin-Name: 105d6c9bbcadc64faa2b24e315cb13227b17cfc6bf1b3512713f80ce56976a3d
* Add tests for running recovery when opening a write transaction or ↵dan2020-05-06
| | | | | performing a checkpoint with blocking locks enabled. Fix some failing assert() statements. FossilOrigin-Name: d096ea3fe20f8af90f9e3f798fd0a69527b32ac8e208ade58b9d0af0e831f41b
* 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
* Add the SQLITE_FCNTL_CKPT_START file-control. Use it to optimize thedrh2020-05-01
| | | | | cksumvfs extension. FossilOrigin-Name: b40f5aa344ae10cf4da83b3aa9e4866d6f6ffb06ba7e34ec1ce80c92468cf3bf
* Use __atomic_load_n() and __atomic_store_n() for a few more things where ↵dan2020-03-30
| | | | | they are available. FossilOrigin-Name: a49f8ec552bede7da731e0571ccf49de1a30e7be3a5673150436c8b411ba6ffc
* Fix "GCC_VESRION" typo in wal.c.dan2020-03-30
| | | FossilOrigin-Name: fbd9378727141848ba2f5a8eee3076ecbd315e4a87b264c6d890103d56b2e4bc
* Modifications to the way blocking locks are used in ↵dan2020-03-27
| | | | | SQLITE_ENABLE_SETLK_TIMEOUT builds so that multiple processes or threads may not deadlock when operating on a single database. FossilOrigin-Name: c516027d5fd876b7d0bf566435667d554db29ded30ad6fc1165caa4a93d015a0
* Simplify the code by removing the unsupported and undocumented drh2020-02-07
| | | | | SQLITE_HAS_CODEC compile-time option FossilOrigin-Name: 5a877221ce90e7523059353a68650c5fdd28ed032807afc2f10afbfbf864bdfe
* Add the SQLITE_FCNTL_CKPT_DONE file-control for the use of custom VFSs.dan2020-01-16
| | | FossilOrigin-Name: 3cc39e5069c8a6a32ecc49c571593615c0f347cadcd3e0325b7f9a11ddc1f546
* More details on the comment justifying the aleged data race in the WAL-modedrh2019-11-27
| | | | | checkpoint logic. FossilOrigin-Name: 0fab65c79f675c825ed7e85c82b65ce6f990c9d0796ebb3886942d241df7b268
* Add new assert() statements in an attempt to help static analyzers avoiddrh2019-07-16
| | | | | false-positives. FossilOrigin-Name: 9e66458592d40fbd96ea5f21339573110ca1cfe328238a020c9420a87d35dd72
* Small performance and size optimization in sqlite3WalFindFrame().drh2019-04-17
| | | FossilOrigin-Name: 03f2e78899fad99b0a0951b3a408268276954d4cd785389ed9a0192c9217f6fe