1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

578 Commits

Author SHA1 Message Date
drh
98c84bec51 Merge the latest trunk fixes and enhancements into the bedrock branch.
FossilOrigin-Name: a6f6fbe6173de8a2c366542432c01efcf959848972e047acf856817605e6b01e
2025-06-28 14:30:07 +00:00
drh
67b28465fc Merge the latest trunk enhancements into the wal2 branch.
FossilOrigin-Name: e7867c3992ea58a510aae0f34044dc0c83dd82a36fb8d037583af060b7443f9a
2025-06-28 14:24:43 +00:00
dan
1ea6a53762 Avoid writing frames with no checksums into the wal file if a savepoint is 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
2025-06-17 11:36:39 +00:00
dan
464a15a92c Merge latest changes from the wal2 branch into this branch.
FossilOrigin-Name: 93740658c8c6f531513764439a0050c86312249683398091a256eda462f75940
2025-06-03 14:19:49 +00:00
dan
efa511f1a8 Merge latest trunk changes into this branch.
FossilOrigin-Name: d685bc8ce32741e549d5636c495a984bb07a404bbd09a8781ce47f6b9664f86a
2025-06-03 14:15:20 +00:00
drh
140748f949 Fix harmless compiler warning introduced by the setlk-snapshot-fix merge.
FossilOrigin-Name: c1f20f89d9eb3e1dd1018c0e0efe5d3043a592f078e235ad04b960334c7186c2
2025-06-03 10:18:54 +00:00
dan
ded1959120 If blocking locks are enabled, avoid using the busy handler when blocked by another process running recovery.
FossilOrigin-Name: a35236757ab57c4c9b34e47c5dbc10d8f1220f8152955f5303cf9c3902ee169b
2025-05-30 20:52:18 +00:00
drh
f34c9b0fb2 Merge all the latest trunk enhancements into the bedrock branch.
FossilOrigin-Name: 3215186aa92041498032a0cb9559a3b9eafd0bb586084e3506bb0c030b039aa5
2025-04-21 13:02:25 +00:00
drh
3c430b72ca Merge the latest trunk enhancements into the wal2 branch.
FossilOrigin-Name: c68d0d353082a5810a48f01637d642bcdfd9f03dd244e0618fc0d7cf5f7b9b12
2025-04-21 12:56:24 +00:00
drh
b0c3118cad Clarify and reduce redundancy in an assert() in walChecksumBytes().
FossilOrigin-Name: 3c53abf5e6df446d569040042363265737aa10fc8aaa20b31c587100c557c5e7
2025-03-24 23:08:40 +00:00
drh
a29e5d6c9f Merge the latest trunk enhancements into the bedrock branch via the
wal2 intermediary.

FossilOrigin-Name: b1860b637232f6e14b6b4ee73be3c64be6622d6c4d934b423269da37d32d6ccc
2025-03-15 20:32:24 +00:00
drh
55c98cfe95 Merge the latest trunk enhancements into the wal2 branch.
FossilOrigin-Name: c8d8f613ed0d7639a8b859e8c7fa7da21bd1221a605c5da6a8fe041f7c9a3f5e
2025-03-15 20:28:42 +00:00
drh
cebf06c798 Make use of the flexible-array feature of C99, when available, to try to
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
2025-03-14 18:10:02 +00:00
drh
1b493be98d Merge the latest trunk enhancements into the bedrock branch through the wal2
intermediary.

FossilOrigin-Name: 203376300781167f3e96da0197a9c8e8da6fed15c56c8980a4c283ef34478a07
2025-03-03 16:01:11 +00:00
drh
699a832669 Merge the latest trunk enhancements into the wal2 branch.
FossilOrigin-Name: 6baea938f0230f8b81b33373f948857fc44c2b3788bf8d4ee6e863b045632b82
2025-03-03 15:57:12 +00:00
dan
58bc525e32 Reinstate the assert() removed by [0f6223b8]. Avoid holding a wal-mode write lock after the transaction has been rolled back if an IO error occurs while restarting the wal file.
FossilOrigin-Name: 277e150d6ab75de2407f6761aa2359df80a4e1dbce30788df06621dee05b2ef1
2025-02-25 15:27:55 +00:00
dan
a4cf066d64 Remove an assert() added by [e88212b1] that is sometimes false.
FossilOrigin-Name: 0f6223b8f6c044db687f78e19f6373d0dda9155445c511a297efa05bac3b16e5
2025-02-25 11:29:04 +00:00
dan
b081a391ce Merge latest changes from trunk into this branch.
FossilOrigin-Name: 55324d1c862c42b95251a398c40930d9fa94debb1aec7d3d0ae734d6b17b4a59
2025-02-24 10:52:34 +00:00
drh
cc42fddfd9 Merge the latest trunk enhancements into the bedrock branch.
FossilOrigin-Name: c09656c62155a6e82d0fa6c27bf8ec40a14854845adfa53db3cb42a0b1b29101
2025-02-18 14:48:14 +00:00
drh
6f918c6b7c Merge all the latest trunk enhancements into the wal2 branch.
FossilOrigin-Name: bd4651659548bfa523dd99f0c771b7d3c9f5dc41d0412f4f939710c4f4c6e17d
2025-02-18 14:38:00 +00:00
dan
ac729222a1 Fix a typo in a comment in wal.c.
FossilOrigin-Name: e0f898f356e50568ebf62f18f39b05d2428038b88e277613bbed818dac1b0fd0
2025-02-17 19:06:01 +00:00
drh
ef86b942b9 Code changes that make it easier to prove that no 32-bit integer overflows
happen during memory allocation.  No problems fixed; this change is just
to make future maintenance easier.

FossilOrigin-Name: 215650a5a1d55bdbca9c92524804a1a54456a17f42a17e53747b21a6507506f5
2025-02-17 17:33:14 +00:00
dan
319b518440 If SQLite is compiled with SQLITE_ENABLE_WAL_BIGHASH defined, use
hash tables large enough to fit 128K, instead of 4K, entries in the *-shm file.

FossilOrigin-Name: 581efc34624c55832afbf7b691d768d6ddbf2b23d6a190d2fa0dde1b00251454
2025-02-05 17:52:13 +00:00
dan
df54ecb1bf Fix a problem causing the write-lock to be held when it should not be in some circumstances following a SEH exception.
FossilOrigin-Name: 7eb5accb7cf937fc967dcd86da0af813fb18a2697348bd231fbefd3c09b930ab
2025-01-30 17:04:28 +00:00
dan
2a8768ad66 If SQLITE_ENABLE_WAL2NOCKSUM is defined, then SQLite calculates the frame checksums used in wal2 mode based on the previous checksum and the frame header only, not the frame body only. This risks corruption following a OS crash or power failure, but also speeds up writes in wal2 mode.
FossilOrigin-Name: dc74bd8915a9e1a915fb4ff3229a7b5e8f89486fe1df812a7738f6627d379648
2025-01-29 15:11:07 +00:00
dan
43aad25b1b Add the sqlite3_setlk_timeout() API. For setting the timeout used by SQLITE_ENABLE_SETLK_TIMEOUT blocking locks without also setting the regular retry-based busy-timeout.
FossilOrigin-Name: 4a7eb492797abb47b18b7dfc557aeae43a0dea5b861efc203398d5059b10d131
2025-01-27 11:50:03 +00:00
dan
2539fb2bc5 Fix a race condition causing SQLite to use a busy-handler for an operation that should not.
FossilOrigin-Name: 6ab9ed8eef77781898375038ab05fc6e5f46b745e4906691393b8b1d90570eb6
2025-01-24 15:49:47 +00:00
drh
602f13bdc9 Merge divergence-reduction changes into the bedrock branch.
FossilOrigin-Name: ec5d7025cba9f4acaea984d5ec29b05b7f4b01f0e36e5287f27a16895ec42bf7
2024-12-16 18:29:31 +00:00
drh
5cf971bdc7 Further reduction in divergence from trunk.
FossilOrigin-Name: e4406a6e2660f1f42614d0034d024cc206109ac71e9f8b289aeed2eba20be8e9
2024-12-16 18:13:47 +00:00
drh
32dd04b41e Code formatting changes to make trunk more like wal2.
FossilOrigin-Name: 8f725472b0fe62359a4cd3237b43d7b834e042d8ce425abde06e3ed6c62dbafa
2024-12-16 18:04:39 +00:00
drh
6b716403f9 Reduce divergence of wal2 from trunk.
FossilOrigin-Name: 90d744d67446a270f7547910531e76593dee82ce537e75c11af0d94eca8404cf
2024-12-16 17:46:21 +00:00
drh
276172e4a3 Remove unnecessary end-of-line whitespace.
FossilOrigin-Name: ae580443d210811c12209866112fc8b0b83281e24945504b748a17d93ad84062
2024-12-16 12:08:47 +00:00
dan
8d98a87912 Merge changes from wal2, including the fix to prevent non-PASSIVE checkpoints from ever taking the writer lock.
FossilOrigin-Name: eb8449ea9ac8e29425f7127535a1db328d56c86382919fb1fcf42324b71de013
2024-12-14 17:36:12 +00:00
dan
686166eb32 Update to walRestartLog() function to make it shorter easier to merge with branch "bedrock".
FossilOrigin-Name: 88d7fb2aef882fc41a4f9c1bdd2f0162289e90d62df50af1b0eb6994c5c94c28
2024-12-14 17:19:06 +00:00
dan
3d6fbe469b Fix a problem with non-PASSIVE wal2 checkpoints sometimes taking the WRITER lock.
FossilOrigin-Name: 11d7865a56c1fbb978e3ba70ddc03c2a16080e2992c580e00e4c6c1fa47c043c
2024-12-14 16:50:29 +00:00
dan
52660d4d37 Do not attempt to switch wal files when writing if the current transaction read from both wal files. This fix is already on branch 'bedrock'.
FossilOrigin-Name: 693cc8e8db6c00249211bdfc21be2bff169ca6b0c4560522dd404615e8ba3b76
2024-12-14 16:41:39 +00:00
dan
7204db1f61 Fix a problem with the output of "PRAGMA wal_checkpoint" introduced long ago by [63483e22c775183e].
FossilOrigin-Name: c5f7bba8683a9aa503750abb7fd937566983dc1ca08361eca8b9b185294b909a
2024-12-13 20:18:29 +00:00
drh
a7e55c660b Update the bedrock branch to version 3.47.0
FossilOrigin-Name: d2d954d43abe20a3cf10cc12f0f9922ba6b94584e39b1ef1991f1d354058c99a
2024-10-21 17:10:05 +00:00
drh
19e1883874 Update the wal2 branch to version 3.47.0
FossilOrigin-Name: d34b6a91389ff82fba4086d142c560e9daff534076df99a4ed0cdbffa9fce85f
2024-10-21 17:05:17 +00:00
stephan
624cb96f54 An assortment of comment typo fixes discovered by aspell. Add several new words to tool/custom.txt. No code changes.
FossilOrigin-Name: 59b76a99e4a28f4cc8c4f9f39ff6e039c4d29cb7b44183f1902b5792638656d2
2024-10-19 12:39:06 +00:00
drh
280675a6b9 Merge the latest trunk enhancements into the bedrock branch.
FossilOrigin-Name: d5289de411cd6cb9d56b4d5d34ad9616ee125f0c1900310e1259a82466955738
2024-10-16 15:09:11 +00:00
drh
da6f00cc63 Merge the latest trunk enhancements into the wal2 branch.
FossilOrigin-Name: 2e96c8bb7aab48f373dae9edabfdc070c9d727e192ced51ab1ce633f3f9a7638
2024-10-16 15:03:12 +00:00
dan
855e3792bd Merge the latest trunk enhancements, via the wal2 branch, into the bedrock branch.
FossilOrigin-Name: fd6ff55141be82ba36513ba6273a60c6d8b3c496ed7890ab47cccb05bec7f7c2
2024-09-30 17:57:58 +00:00
drh
5bd2d02612 Merge the latest trunk enhancements into the wal2 branch.
FossilOrigin-Name: 0f9e2fceecdb7fad0a2528a4244a786d17274d11b83f336d6012420675a2e4cd
2024-09-30 14:41:43 +00:00
dan
d0720eee5e When possible, avoid taking wal file read-lock 0 in sqlite3_snapshot_get().
FossilOrigin-Name: 34b6ac3d76dbc6819778ec2a0f81cbcdcc0cd1a6303381d97f1c479e4ecdd132
2024-09-26 18:02:17 +00:00
drh
5600adf1b1 Move the vfstrace extension out of src/ over into ext/misc/ where it belongs.
Make it part of the standard build for the CLI.  Bring some of the vfstrace
output up-to-date.

FossilOrigin-Name: 055b97de8d2397987d72dbab1cde78ece2d1c066e95042b4ed6b7b36b2cf9006
2024-09-09 14:50:23 +00:00
drh
e11232a37a Merge all the latest trunk enhancements, and especially the
order-by-subquery optimization, into the bedrock branch, via wal2.

FossilOrigin-Name: d0591db3bb84c8f6325d3d5a44467f602cf6d8da6aef6456ef0bd3a19fca3d90
2024-08-16 19:04:36 +00:00
dan
742f74ec19 Fix some signed/unsigned compiler warnings on this branch.
FossilOrigin-Name: 681d228023efb902b9039acf33600dd91f158e622d4dc0b434ed74f39ce0070a
2024-08-09 10:56:11 +00:00
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