aboutsummaryrefslogtreecommitdiff
path: root/src/wal.c
Commit message (Collapse)AuthorAge
...
* | | Change the structuree exception handler in wal.c to catch ↵dan2021-08-26
| | | | | | | | | | | | | | | EXCEPTION_IN_PAGE_ERROR instead of EXCEPTION_ACCESS_VIOLATION. FossilOrigin-Name: 0c6ab539cfbc908550fa993a587e85d644b6335853ff9781caae860c461c045d
* | | Use VVA_ONLY() instead of TESTONLY() in SEH macros so that the builddrh2021-08-20
| | | | | | | | | | | | | | | works for coverage testing. FossilOrigin-Name: 9e9d5b566da72adf780685ea27da7d76a7274e904a533438255af92875c94503
* | | Add missing SEH_INJECT_FAULT macros.dan2021-08-20
| | | | | | | | | FossilOrigin-Name: 27e9bdb3a90a5826f45d32e0378e9afa90a16ac762a75236f38218f41bc45ded
* | | Add some assert() statements and fix small issues with code on this branch.dan2021-08-20
| | | | | | | | | FossilOrigin-Name: bd9b373b177a71f5eaeb7ce8dd1dc755b34951ee1376c24652418bb329bfcb45
* | | Fix a problem on this branch causing checkpoints that do not proceed because ↵dan2021-08-20
| | | | | | | | | | | | | | | they can't get the CHECKPOINT lock to return incorrect output values. FossilOrigin-Name: 5a98820c3d20766813bb4b0da23247ac90f380c07827ff13b61d5b606d8311aa
* | | Enable this branch to run both with and without the -DSQLITE_USE_SEH option.drh2021-08-19
| | | | | | | | | FossilOrigin-Name: 840e0a14ebc4a85d4ede0223287d4c1e4465e9f20c3c43bfc74775dddec1fa8f
* | | If SQLITE_USE_SEH is defined, handle structured-exceptions thrown by MSVC ↵dan2021-08-19
|/ / | | | | | | | | builds if the *-shm file mapping is accessed after it becomes invalid for some reason. FossilOrigin-Name: 5c5fa47076c5da25ca92248df3a4c11b90a0225a07f05d7220fa95d9bbb36f43
* | 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
* Fixes for harmless compiler warnings.drh2019-04-13
| | | FossilOrigin-Name: c28c973ad6debd63f13e5d4d3da036f680baaec9d863eda039f2747db9f1cfd5
* Add a defense-in-depth NEVER() test to the WAL cleanup code.drh2019-04-03
| | | FossilOrigin-Name: 8d3af2010f4f652865f5c0d18e3bc793de05f8e75e75cc77786f61004b2ad28f
* Fix a harmless compiler warning that arose from the ENABLE_CURSOR_HINTSdrh2018-09-12
| | | | | fix of check-in [0af18674ca5b34e67e] FossilOrigin-Name: f578e62ae6f6cc78d8281adab9fa93f3f58711879c2860bbe19f291d257dc0af
* If a call to sqlite3_snapshot_open() fails because the requested snapshot nodan2018-08-31
| | | | | longer exists, return SQLITE_ERROR_SNAPSHOT instead of SQLITE_BUSY_SNAPSHOT. FossilOrigin-Name: e07923128bb164efbafde29d49175b61f2ef44b2dfac5ae4ed61937945dfcf4c
* Try to identify the places in WAL code where thread-safety depends on thedrh2018-08-30
| | | | | | underlying architecture supporting atomic load and store of aligned 32-bit values. FossilOrigin-Name: 47d44be4a68d377d0049a12b2587dbbcc0870b469473e1098f7c0358fe8c7532
* Fix a problem causing spurious SQLITE_CORRUPT errors when using the snapshotdan2018-08-28
| | | | | API to read from old database snapshots. FossilOrigin-Name: 535155be584ad8c1836e6b1c62de836d9872056d39608c995221c928cb5b365d
* Allow sqlite3_snapshot_open() to be called to change the snapshot after a readdan2018-08-15
|\ | | | | | | | | transaction is already open on database. FossilOrigin-Name: 41399169954f9bef53c3fa89879f39823b80bd127f76cf60abbe24217878a571