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

181 Commits

Author SHA1 Message Date
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
c071c47b51 Tamp down various harmless compiler warnings. Use "int" in places instead
of "u16" or "i16" since the compiler complains less and generates faster
code.

FossilOrigin-Name: 742827f049768c4f69ccdfaadfad339aaad3bc126d3a68b90cfea01d825bf7ce
2025-02-22 16:44:14 +00:00
drh
1d4bf383d7 Merge the latest trunk enhancements into the bedrock branch.
FossilOrigin-Name: 5c8e80f435dc24d5af9f217f9034215bf0b39fa5888eda9f4416da832da2735f
2024-03-13 18:00:23 +00:00
dan
d90ecb5d6e Have "PRAGMA quick_check" compare the number of entries in tables and indexes.
FossilOrigin-Name: cc294c041b4c7a044ff344989f872415ced5263a0b654112371b2da7c852a688
2024-02-02 16:51:24 +00:00
drh
ca86e10cdd Merge the latest trunk changes into the bedrock branch.
FossilOrigin-Name: c2e53000f4740be9f0492fda1857c5f2f5539fe17bdaafcafdf8d14c8f3218ce
2023-12-06 21:18:03 +00:00
stephan
a328c42724 Minor doc fix in src/betreeInt.h, prompted by an email report. No code changes.
FossilOrigin-Name: 30d49aaed20454fe006e2f89db58f0c0b2433c99b2676a0b9583f56b7adb7fdb
2023-11-22 22:59:28 +00:00
dan
1d2a05fc10 Merge latest changes from wal2 into this branch.
FossilOrigin-Name: c9c9bc097a622bfb6e094b1178cd44da19418cf19cb2d6ad54b9bb868de51f10
2023-10-23 16:08:37 +00:00
drh
266e5d034b Avoid an unnecessary malloc() for the page usage bitmap when running
a partial integrity_check.

FossilOrigin-Name: 2904fcbeebba9189cebc48e58d12fc46f78ee23d8c4d46644606691f8cabb80c
2023-10-21 11:06:03 +00:00
drh
afdcd07fae Merge the latest trunk enhancements into the bedrock branch.
FossilOrigin-Name: 877ffece0531054f24410c9e4c0b89599a9506689cc97233d33c18b9a15e6308
2023-08-03 23:26:39 +00:00
larrybr
104e225074 Fix doc error noted in [forum:/forumpost/11fc7308d5e607f2|the forum] and a misspelling.
FossilOrigin-Name: 6b79cc7dd07d41da6034386b39c0dff32f80a977db42a9602330ffd15706ab9b
2023-07-28 21:38:50 +00:00
drh
f3445f4757 Merge the latest trunk enhancements into the bedrock branch.
FossilOrigin-Name: 0551b79b17579a91d891c745ecd0e35b5142f944ed59eb3c95c37e5a4de8a461
2023-06-22 14:40:38 +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
bc91738e66 Add a C-source spell-checking facility. make misspell (on Nix)
FossilOrigin-Name: 26c1bb4bd9e9f56613c3aa87407a7f562fd4ebde5bfd6dece02078001d9a45f8
2023-06-07 08:40:31 +00:00
drh
20035253bd Merge the latest 3.42.0 beta changes into the bedrock branch.
FossilOrigin-Name: d55ba8bb85b1796d534d2db196db63312624630738712054553bd01f2ab30df9
2023-05-13 15:10:42 +00:00
drh
61791c6f4c Fix harmless typos in comments.
FossilOrigin-Name: 607c3efbe0293d7c11a955a9f21e24fb9f7f1bb758e13e60f4ba0cc0ac8b900c
2023-05-12 12:45:56 +00:00
dan
bf1305334f Merge latest wal2 changes into this branch.
FossilOrigin-Name: b2e0800b24f8c676e189d63abd77ca45a972de9722ece5de6efe2db6ede75cbd
2023-05-04 14:41:10 +00:00
drh
67a17779cb Fix typo in comment. [forum:/forumpost/3da7d9c445|Forum post 3da7d9c445].
FossilOrigin-Name: 41a8a15c4b6f6157b12d43976e300763ef8a4963986d2806557ad0d8b0a784cd
2023-05-02 10:22:05 +00:00
drh
e5ea81ae85 Improved error messages from PRAGMA integrity_check. Identify the root of
the tree when a problem is found in a b-tree, making it easier to track the
problem to a specific table or index.

FossilOrigin-Name: a1cb152e69c7c6cdd99300c91a8104716089de459d9d19e33ef38432aad70908
2023-04-01 13:14:53 +00:00
dan
d9a58ab810 Merge latest enhancments into this branch from branch wal2.
FossilOrigin-Name: 5a22010c35789c6d12e4dd45c81c10b203f4662f206cb636bd0c2781f1cd9571
2023-02-02 14:27:56 +00:00
drh
8518eaccd7 Fix duplicate semicolon in btreeInt.h.
[forum:/forumpost/8db1711ca2|Forum post 8db1711ca2]

FossilOrigin-Name: 7526c46632578a2b602622b9debc406b52af4a42cc880970c4307d13853d59d3
2023-01-11 20:52:15 +00:00
drh
5dd74bf384 Improved progress-handler and interrupt detection during PRAGMA integrity_check.
FossilOrigin-Name: 6db42780a9e530bcc94490cc6080536309666dc13523272d1799d6661137e908
2023-01-11 16:17:31 +00:00
drh
d50f1f4f5b Merge the latest trunk enhancements into the begin-concurrent-pnu-wal2
branch.

FossilOrigin-Name: bcab19d21be42121f1ea3961aedbbe463c60d85d0a3dd8b9593040d217bac3a7
2022-12-21 20:43:53 +00:00
drh
e7d5384418 Performance optimization to sqlite3BtreeInsert().
FossilOrigin-Name: b8976ebfe03fbc1e09a38d598a62493a7f19ff7a2a3acd1ec54d0dee190471e9
2022-11-21 14:13:10 +00:00
drh
d7f2abf418 Merge the latest trunk changes into the begin-concurrent-pnu-wal2 branch.
FossilOrigin-Name: 0071d9da18c639e3865b4d216420415b40ad7fa98cd4288c4e2b98c2c59144a9
2022-03-12 15:11:53 +00:00
drh
32135d7e0a Fix a minor typo in a comment.
FossilOrigin-Name: cf61419f8816377f40ea032e1e3fb8b765ff7eb5b3a5ece8f7b59acffc5d3f05
2022-03-08 15:49:17 +00:00
drh
a055abb8c4 The MemPage.aDataEnd field should point to the end of the data buffer for
the page, not just the end of the usable portion of that buffer.  The purpose
aDataEnd is to detect cells that overflow the page, and that won't work on a
page with reserved bytes and a cell that starts in the reserved region, unless
the boundary is at the very end of the page. Chromium issue 1276294.

FossilOrigin-Name: f839c0bc8388a31f6db5081906b66b9e129855ba27a13cf13bd995b083f7386e
2022-03-01 20:15:04 +00:00
drh
584bfcaeb6 Store the page number for the PENDING_BYTE page in the Pager object, rather
than computing the page number every time it is needed, because it turns out
that number is needed quite frequently.  This saves a few hundred thousand
CPU cycles and a few bytes of code space.

FossilOrigin-Name: 5aa9c3eb45514d5eb7b32696d25a9aeb7dad485e1ea5adb833fac6d1f2105f1a
2022-02-23 17:00:44 +00:00
drh
c34c456d82 Merge trunk enhancements into the begin-concurrent-pnu-wal2 branch.
FossilOrigin-Name: 1958e6facaaca8e695ae3d7e79acdba0025d6221653397ea45f9b8daa56c8d9b
2021-10-21 14:24:24 +00:00
dan
1273d69c82 Have the btree layer detect when a "DELETE FROM tbl" statement is clearing a database page that is still in use (due to database corruption) and report SQLITE_CORRUPT.
FossilOrigin-Name: a6fda39e81d0da98dd6b60b32e6df786f0089c1f4ac7f3a2936afd118bd04353
2021-10-16 17:09:36 +00:00
drh
b2dcfcad79 Merge up all the 3.35.3 changes into the begin-concurrent-pnu-wal2 branch.
FossilOrigin-Name: 4d425e641d3c45692904018aa8fcff678836b45509e640e67fa2d1ade625a746
2021-03-26 14:04:34 +00:00
drh
2b994ce5d3 Change the name of the iDataVersion field of Btree to iBDataVersion to make
it distinct from Pager.iDataVersion.

FossilOrigin-Name: e4c44c0bca317c03f8e6d3aa7cc88e5f96159a3d91c07257d408f7db028fd151
2021-03-18 12:36:09 +00:00
drh
1641e35ac4 Merge in recent enhancements.
FossilOrigin-Name: b0fc8ca14ec8ed3a42bf647b112d5fba640f2adc948485da795fc802b74b3106
2021-03-03 19:41:15 +00:00
dan
7aae73588a Better integrate the changes on this branch with OP_Insert and OP_IdxInsert.
FossilOrigin-Name: 101cef14910d6e865a94bc870aed599321b893188062a9a61d70a9434992cf23
2020-12-10 18:06:24 +00:00
dan
74154a7904 Merge latest changes from wal2 branch.
FossilOrigin-Name: b451bb724ea73367a27c51fcf6e48d02d774c7c5b5b8ec0bd3726a6e4689e591
2020-11-26 18:41:08 +00:00
drh
37ccfcfeb9 New test-control that returns the number of calls to
sqlite3BtreeMovetoUnpacked() on the main database and then resets the
counter.  This only works for SQLITE_DEBUG builds.

FossilOrigin-Name: dca5b91926431768babac28a6faf7674a5014db95caba727995b470e92b3182a
2020-08-31 18:49:04 +00:00
drh
99744fa4ab Add support for the sqlite3_txn_state() interface.
FossilOrigin-Name: ad195e3dd89d0f33b50070c18fb8f43c4eb24162515dfdd7c04d9e7d96b902a2
2020-08-25 19:09:07 +00:00
dan
57f7daf312 Merge latest wal2 changes into this branch.
FossilOrigin-Name: ebd39665e5787fa2c35941ab6c6019f95f0c01229076e3859a3349b516183985
2020-07-31 17:08:40 +00:00
drh
abc3815860 Continuing work toward supporting unsigned 32-bit page numbers.
FossilOrigin-Name: 9ce1710aad43cebe5ad50859c7685fb83e40cdd4a60913bd2b7e659bc59942fd
2020-07-22 13:38:04 +00:00
drh
8ddf635811 Change the name of IntegrityCk.mallocFailed to IntegrityCk.bOomFault to
avoid confusion with the sqlite3 object field with the same name.

FossilOrigin-Name: 87c7d962581f4bb1224086701352850ede9847dc76235b33c7c2a35ef594d382
2020-06-29 18:30:49 +00:00
drh
ccb2113a62 Refactoring various names. No changes in the resulting machine code.
FossilOrigin-Name: 7bb08b1bfcf184e4b59c8c9028926a0052612ff6a6731914ccdb8dee07ea4a98
2020-06-19 11:34:57 +00:00
dan
9019e39d0d Merge latest trunk changes into this branch.
FossilOrigin-Name: 5dc355ccf6ecf0af61e73efbf65bc5e1e192f748568344afbf8bca014ef98df9
2020-05-18 19:55:43 +00:00
drh
e937df81f0 Fix the handling of reserve-bytes so that the maximum value of 255 can be used.
FossilOrigin-Name: 99749d4fd4930ccf15227f67c732266af9e09dd3cabdc0834fb450ef98196441
2020-05-07 01:56:57 +00:00
drh
45248de39a The SQLITE_TESTCTRL_RESERVE operator is removed. In its place is the
more generate SQLITE_FCNTL_RESERVE_BYTES which is an API and which can
operator on more than just the main schema.

FossilOrigin-Name: abc1aad74f7b6a1e72fb09936239f2224aa942d16296c6a3de0b8daef4bc8471
2020-04-20 15:18:43 +00:00
drh
bf92e44f43 Merge recent trunk changes into begin-concurrent-pnu-wal2.
FossilOrigin-Name: 6c11b67bd2c2844566027d59bf5a342d8b2bebd591cd06922e4609e79aa46b82
2020-04-09 19:00:09 +00:00
drh
b48c0d59fa Simplify the code by removing the unsupported and undocumented
SQLITE_HAS_CODEC compile-time option

FossilOrigin-Name: 5a877221ce90e7523059353a68650c5fdd28ed032807afc2f10afbfbf864bdfe
2020-02-07 01:12:53 +00:00
drh
7ee2126844 Merge in the latest trunk changes via the begin-concurrent-pnu branch.
FossilOrigin-Name: 350627f3b12a94723b7d52cae8a53d07917ff037c4be9312ef7e4fd2e845b9cc
2020-01-15 14:21:02 +00:00
drh
7b14b65d20 Do not allow triggers that run as part of REPLACE conflict resolution
during an UPDATE to modify the the table being updated.  Otherwise, those
triggers might delete content out from under the update operation, leading
to all kinds of problems.  Ticket [314cc133e5ada126]

FossilOrigin-Name: db4b7e1dc399c1f16b827ac087aa37c0815f4b2f41f1ffad59963eead2ab5562
2019-12-29 22:08:20 +00:00
drh
21f6daa2cd Faster response to sqlite3_interrupt() in the OP_IntegrityCk and OP_Count
opcodes.

FossilOrigin-Name: bf875dc59909f9c22f7c1fc843bc4d9e5d97af5cb4ef43c4fa1d566ddfdeaacb
2019-10-11 14:21:48 +00:00
drh
b0120de573 Merge the latest enhancements and fixes from trunk.
FossilOrigin-Name: 543ecb30d67bdf7639ea5d57d091e8c0981d4b5042bb6f9cedd1264bbcbef0de
2019-03-08 16:06:26 +00:00
drh
a941ff712d Change an assert() into a NEVER(), since the condition is difficult to prove
with certainty.  Improved comment on the MemPage.nFree field.

FossilOrigin-Name: fec071b89df2cbafda365077bb54bc9999e12086f36d6cea8d125662b36638dc
2019-02-12 00:58:10 +00:00