1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00
Commit Graph

530 Commits

Author SHA1 Message Date
dan
0632fb359a Fix some signed/unsigned compiler warnings on this branch.
FossilOrigin-Name: d615d5291871ba120d916c4722e6067e083f394c6a7f398059442b36c4500718
2024-08-09 10:50:20 +00:00
dan
83b448f75a Merge latest wal2 changes into this branch.
FossilOrigin-Name: c39f6585226dfc460372d55189b37fba07468126d3961bff625cea8a95956783
2024-01-13 20:36:34 +00:00
dan
ff46ff5c73 Merge latest trunk changes into this branch.
FossilOrigin-Name: 68c2b8d0ebd1a180c4828cb4996c6c5fd67386c3b6304edf587c255f8d067c24
2024-01-13 20:21:36 +00:00
drh
5fdabcf9ff Put an SQLITE_ENABLE_SETLK_TIMEOUT branch inside the appropriate ifdef with
an assert on the else since the condition is always false if SETLK_TIMEOUT
is not available.

FossilOrigin-Name: d81e7a036ac5d70b6a6ee6ab7d81e041c1f5fc04b70bcee47e203d521caf7e93
2024-01-09 23:15:46 +00:00
dan
4e50f7763b Ensure that SQLITE_PROTOCOL is not returned too early when a 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
2024-01-06 19:16:54 +00:00
drh
7936fef022 Merge the latest trunk enhancements into the bedrock branch.
FossilOrigin-Name: 707f79c70c8b0fd889aede8806148457c691a008d0ce030084ba79f1e66ec53d
2024-01-04 16:28:49 +00:00
drh
b60eb8bf6e Merge the latest trunk enhancements into the wal2 branch.
FossilOrigin-Name: 8fb42df89a47b716c824de8742b7e3bda1a5c0f9a85ce3f328d7aa94ab735497
2024-01-04 16:16:41 +00:00
drh
f5740f72ec Adjust the sqlite3PagerDirectReadOk() routine (part of the
SQLITE_DIRECT_OVERFLOW_READ optimization) to use less code and to be
more easily testable.

FossilOrigin-Name: eed670ea2a9424f7df4eeb01c152fc38f7190a5e39aa891651b28dc91fcdc019
2024-01-02 21:37:51 +00:00
drh
ca86e10cdd Merge the latest trunk changes into the bedrock branch.
FossilOrigin-Name: c2e53000f4740be9f0492fda1857c5f2f5539fe17bdaafcafdf8d14c8f3218ce
2023-12-06 21:18:03 +00:00
dan
47409209c2 Update this branch with latest changes from trunk.
FossilOrigin-Name: 7f1b61a3ea2cc5132abf91b0f635be4fcaa082de7b33ca131874a75ae11ee576
2023-11-28 17:32:30 +00:00
dan
940b23bc3a In SQLITE_ENABLE_SETLK_TIMEOUT builds, use blocking locks in place of sleep() calls when opening a read-transaction.
FossilOrigin-Name: 4c055b7a6e4533e1e571773456226ca7038ce372df3eedbbbcd9a81e8652a6cf
2023-11-28 17:12:42 +00:00
dan
b8950e0f45 Handle an SQLITE_BUSY_TIMEOUT error if one occurs while attempting a shared lock on a read-lock slot.
FossilOrigin-Name: 5fbf3906d272df3eb981f67455eb35f649ad2774cba9fc3f077b28d9bef3f0cb
2023-11-28 15:29:04 +00:00
dan
bae2d0f2eb Have SQLITE_ENABLE_SETLK_TIMEOUT builds block when locking a read-lock slot.
FossilOrigin-Name: f797baf47cf7859cfd8ce248f4f3087af4551a7040af990333426e5a7c269504
2023-11-27 20:37:03 +00:00
dan
e52854a9e6 In SQLITE_ENABLE_SETLK_TIMEOUT builds, use blocking locks in place of sleep() when opening a read-transaction.
FossilOrigin-Name: a51ef39998e25e86bd0600e71d15011b12e05f4319608018293bdaecb09e8c97
2023-11-27 19:22:50 +00:00
dan
91c8e65dd4 Changes so that if SQLITE_ENABLE_SETLK_TIMEOUT is defined as 2 instead of 1, all blocking locks are taken for a single millisecond and the default busy-handler invoked as normal.
FossilOrigin-Name: 79e24ec3dd40373bbb93792829b18d9ef40daf19d4606174e36c8e19e61a7529
2023-11-15 19:19:04 +00:00
dan
0ad5301378 Avoid blocking as part of passive checkpoint operations, even if SQLITE_ENABLE_SETLK_TIMEOUT is defined.
FossilOrigin-Name: e5ecc404cae1ce8b639d0263fa07571c066f11bfc62f5ba331ad7ae138e78572
2023-11-08 15:49:57 +00:00
dan
1d2a05fc10 Merge latest changes from wal2 into this branch.
FossilOrigin-Name: c9c9bc097a622bfb6e094b1178cd44da19418cf19cb2d6ad54b9bb868de51f10
2023-10-23 16:08:37 +00:00
dan
9d086cc562 Fix a sanitizer runtime error in wal2 code (that (1 << 31) cannot be represented as an int).
FossilOrigin-Name: 79a920c036c91bbae737e4f4c5310052d26407fe7d23bcf95a2aa79ea3773a0f
2023-09-08 16:49:45 +00:00
dan
a7866eefb5 Merge latest changes from the wal2 branch into this one.
FossilOrigin-Name: 4d8df0c426b8ce3db6cfb71e23f752026ef886b9bb833dc4be9717db9955b1db
2023-08-21 18:31:53 +00:00
dan
aabb710293 Fix problems related to structured-exception-handling on this branch.
FossilOrigin-Name: d3d77e35ea39df9e22032a7e1af5b7f38d53a4d43bc46afe36e342cdcfd17528
2023-08-21 18:25:41 +00:00
dan
cc74eafee5 Merge latest trunk changes into this branch.
FossilOrigin-Name: 135bf72c6b5f436b11463dd40b3a73bcc610bf9c2dcbe6646dbedd0d9325f6a9
2023-08-21 18:02:57 +00:00
drh
36a9f5c24c Fix a possible UAF in SEH if an exception occurs at an inopportune moment
during WAL processing.

FossilOrigin-Name: 91b91037e348fa10cf6a9d8a0ffbfdebb4a40e0e336b65b112ed1c828e75cda7
2023-08-17 14:19:44 +00:00
dan
9541fbc283 Fix a problem in sqlite3_snapshot_recover() introduced by the [8a6b0c24937e855b] merge.
FossilOrigin-Name: c2577eb0a4a627c65d675f1446514843486092be9cb271b682793a0107e496cd
2023-08-14 18:21:56 +00:00
dan
f08877f094 Merge latest wal2 changes, including support for handling of structured-exceptions in MSVC builds, with this branch.
FossilOrigin-Name: 331f2f3e5db9b6139be984f1b959cd0d51563adaa68452aa2f42741c69bc6319
2023-08-11 19:36:24 +00:00
dan
45d92dd539 Merge latest trunk changes, including support for handling of structured-exceptions in MSVC builds, with this branch.
FossilOrigin-Name: 00bfae9ffafd71dfd0bbdbdc174e4ed7d7a850b385416f83be36a4f4a55d1873
2023-08-11 19:33:54 +00:00
dan
5e22dfb6a5 Add a comment describing the contents of the ExceptionInformation[] array for win32 EXCEPTION_IN_PAGE_ERROR exceptions. No changes to code.
FossilOrigin-Name: 8e20354242d5f34a90b6c00d9034535ef6f6086ee4971230c7fd69985e2777d2
2023-07-26 18:34:34 +00:00
drh
1671e05696 Merge the latest trunk enhancements into the bedrock branch.
FossilOrigin-Name: a6f344399472e211941dffa6586a83fc1740c60e807e85387080a88c9c54658d
2023-07-24 13:24:40 +00:00
drh
ecd48447b2 Merge the latest trunk enhancements into the wal2 branch.
FossilOrigin-Name: b2e56f62ad8f114126fda6b8c1266d194bb1356b8a302956c5e9ad90d8c1d73b
2023-07-24 13:20:39 +00:00
drh
5202b7ca75 Update the latest trunk enhancements into the wal-shm-exceptions branch.
FossilOrigin-Name: 3187ee3f69fc28a259ba0e951ac10a65c07ef2c3866acbefaf9544333a930cc6
2023-07-24 12:59:53 +00:00
drh
8a1104940d Reduce divergence between branches: trunk and wal-shm-exceptions.
FossilOrigin-Name: d38ed6b1fc6b572997d520c36f256c11404fb1bd5f28acab07466bfc96554a8f
2023-07-11 19:54:17 +00:00
drh
66422b57f9 Get fault injection for testing working correctly. Other code clean-up.
FossilOrigin-Name: ff492277ed00c1f637a5b4ccd6d8193ea22f6781f90073861588a2b7d5c045b7
2023-07-11 15:52:52 +00:00
drh
5d3cc0c09b Fix a warning. Unclear yet if the code is correct this way or not.
FossilOrigin-Name: 2df4fd76ef48bb63389df8d783059af6b8f2cbb2c11d07953b408e71f50b625b
2023-07-10 18:16:49 +00:00
drh
cc9380f68d Merge the latest trunk enhancements into the wal-shm-exceptions branch.
FossilOrigin-Name: f655d08d019bab0c578886e91ca24fd956d1b3dea9b9c9104812b3cf62e5e556
2023-07-10 18:05:23 +00:00
drh
ff96718b52 Merge all recent trunk enhancements into the wal-shm-exceptions branch.
FossilOrigin-Name: e59cea2d851be68559e7d01a01cb05684c44d151d022ea9790ce99671016ab00
2023-07-06 17:55:33 +00:00
drh
f3445f4757 Merge the latest trunk enhancements into the bedrock branch.
FossilOrigin-Name: 0551b79b17579a91d891c745ecd0e35b5142f944ed59eb3c95c37e5a4de8a461
2023-06-22 14:40:38 +00:00
drh
b17135d81f Merge the latest trunk enhancements into the wal2 branch.
FossilOrigin-Name: 80ac494f734d9720fbbb1111741aa99fc319c6c9a32e7f13b5962001d6ace828
2023-06-22 14:20:03 +00:00
dan
d095b2c3d5 Add the sqlite3_commit_status() API. For querying a connection for (a) the ranges of wal/wal2 frames written after a successful commit, and (b) the conflicting frame following a failed commit of a BEGIN CONCURRENT transaction.
FossilOrigin-Name: 4b08d4dad6b254a342353e3f765066c85cbc5450fe13501665c648627cca21cd
2023-06-19 18:16:19 +00:00
larrybr
55be21647e Fix straggler misspellings and tidy the custom dictionary. Also include pickups from [forum:/info/c61fb09afd|forum post c61fb09afd].
FossilOrigin-Name: 8c291d99946eb32b20b743921202f9c7cfb716268ff526817b27adbb7942e40b
2023-06-07 17:03:22 +00:00
larrybr
bc91738e66 Add a C-source spell-checking facility. make misspell (on Nix)
FossilOrigin-Name: 26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
2023-06-07 08:40:31 +00:00
dan
bf1305334f Merge latest wal2 changes into this branch.
FossilOrigin-Name: b2e0800b24f8c676e189d63abd77ca45a972de9722ece5de6efe2db6ede75cbd
2023-05-04 14:41:10 +00:00
dan
d17b9114aa Update this branch with latest changes from trunk.
FossilOrigin-Name: 49777032f29517d23c8c7483536f8ba828e7000dc303415da6881cc458620be2
2023-05-04 14:31:17 +00:00
drh
dda2833a4e Add a comment to the [0512f82a2cde7447] change to link it to its TH3 test case.
FossilOrigin-Name: 1281d4d9d799ef83e6eb51d656ede82b4503d39adf169deb936b30ebfddd88b1
2023-05-03 13:33:37 +00:00
drh
ce2aa8bebe If the page size is wrong on the page1 content inside a WAL file, then
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
2023-05-03 06:48:08 +00:00
drh
6c9cc2c4f8 Merge the latest trunk enhancements into the wal2 branch.
FossilOrigin-Name: 0215dcc76d7b3a1dad10b8e6fd8b54f2ab5006a156db5cee992ab2dac98d9284
2023-05-02 19:58:35 +00:00
drh
3f4a319934 Unwrap the loop in the WAL hash function.
FossilOrigin-Name: eb94ae13206762a42ddad12e0d1461df83e9759e44a369f188cd3aad82f211c4
2023-04-12 20:23:03 +00:00
drh
fbaf259e0e Merge the latest trunk enhancements into the bedrock branch.
FossilOrigin-Name: b7d9f14d78a52f87fcc7bc1d3e9f00d6ce1d648b1b244bc3989d7308f52063a0
2023-02-07 11:39:47 +00:00
dan
e3d452a826 Fix a dropped error code in wal.c.
FossilOrigin-Name: 2537db6f6b9df00913b57e2ad0e4deef2040ce47b28f9a9939f42c0443d70ac9
2023-02-07 11:19:20 +00:00
dan
faff28a478 Fix an assert() in sqlite3WalFindFrame() so that it matches the equivalent assert() on trunk.
FossilOrigin-Name: f5bf91d9bf3910ab3dcf44c138084dfc26fb123edb8934bfdfcdd5c4afb67f2d
2023-02-07 10:58:39 +00:00
drh
70cfee98e5 Disable an invalid assert(). Add the "WAL2" compile-time property so that
test scripts can more easily determine that they are dealing with a
WAL2-capable build.

FossilOrigin-Name: e93113259e05fb6b81ad1b4a460bd54168ff5c372b643d4845c1b1c87b7db204
2023-02-06 19:00:53 +00:00
dan
9271d22909 Fix a startup race condition that could occur if a wal file grows from 0 bytes while a BEGIN CONCURRENT transaction is running.
FossilOrigin-Name: 2c14f3832e0e21c4e68b556d5592860fcd79b6ca21db6c47f52a240b24559a9a
2023-01-12 15:44:48 +00:00