Leonid Yuriev
6bd0277020
mdbx: minor fix mdbx_cursor_close()
.
...
Avoids reference to txn which could be already freed.
Change-Id: I4e1fadd9786ced1533bb8468d30e013455601228
2021-01-20 09:55:11 +03:00
Leonid Yuriev
7d09de489d
mdbx: fix minor MSVC warnings.
...
Change-Id: I633b8847698dca25b6c395216744e157f6fb240d
2021-01-20 09:55:11 +03:00
Leonid Yuriev
0d09c2cda9
mdbx: avoid overflow for dirty & leftover space inside mdbx_txn_info()
.
...
Change-Id: I36f4d62881e68f1bfe0d11fde2e849cdf1408ed2
2021-01-20 02:07:44 +03:00
Leonid Yuriev
42670aa64a
mdbx: fix MSVC warnings aroung size_t
and unsigned
conversion.
...
Change-Id: I32bd3ee4fe02ac62cc121f33b2f84bf63c81cb75
2021-01-20 01:39:21 +03:00
Leonid Yuriev
6d7daf6401
mdbx: fix audit for complex nested txn cases.
...
Change-Id: I2419cbe0e8d3167e77ac99f397b97edb22717833
2021-01-19 23:53:16 +03:00
Leonid Yuriev
f28da7c9e3
mdbx: rework spilling, page-lists, commit & abort for nested transactions, etc (squashed).
...
Change-Id: I09e4744586342aeae4efcfb71f41a3248ee47758
2021-01-19 23:53:16 +03:00
Leonid Yuriev
7bae2a7cd2
mdbx: provide MDBX_ENABLE_REFUND
build option.
...
Change-Id: I0e4c94a22f3b0957176431709604a7595f85252a
2021-01-19 23:53:16 +03:00
Leonid Yuriev
7183f62e13
mdbx: rework DBI_DIRTY
and MDBX_TXN_DIRTY
propagation.
...
Change-Id: Ief12ee320ce7c7142632bd1142d847aac314db0b
2021-01-19 23:53:16 +03:00
Leonid Yuriev
4afc30c79f
mdbx: rework mdbx_page_alloc()
.
...
Change-Id: I5c6e2ef23abf79096dd699f9dfbecf97bfc4fe37
2021-01-19 23:53:16 +03:00
Leonid Yuriev
764dab90fc
mdbx-tests: set MALLOC_CHECK
environment varilables.
...
Change-Id: Ic5d2a4b5c69d05111051432996f5382bb73caba1
2021-01-19 23:53:16 +03:00
Leonid Yuriev
c6a8f0f9af
mdbx-tools: minor refine mdbx_chk
error output.
...
Change-Id: I4692a46c3e007fa2910ef67ec7fe21c7285e92eb
2021-01-19 23:53:16 +03:00
Leonid Yuriev
966d7027a3
mdbx: minor fix bad_page()
debug output.
...
Change-Id: I14531fdceaad054ad8c45bf9042fee73de1f9a36
2021-01-19 23:53:16 +03:00
Leonid Yuriev
dfc92d9f96
mdbx: minor fix mdbx_page_new()
debug output.
...
Change-Id: If60f972cc3271ca91feea923fb4f4be48d488b22
2021-01-19 23:53:16 +03:00
Leonid Yuriev
ac0f4e14a8
mdbx: minor fix mdbx_page_new()
debug output.
...
Change-Id: I2f386ec6276cab404607b5c3a79d8028d73dad62
2021-01-19 23:53:16 +03:00
Leonid Yuriev
ca597f4314
mdbx: fix mdbx_page_flush()
for possibility of memleack.
...
Change-Id: Ieab0c98fcd1020d49cce73234125ceb11a8f0b64
2021-01-19 23:53:16 +03:00
Leonid Yuriev
c1fef9b51d
mdbx: fix mdbx_update_gc()
for retired page list change case.
...
Change-Id: Ic454262edcda8881182a15d6a521b90990e5551d
2021-01-19 23:53:16 +03:00
Leonid Yuriev
b8bb4b4cc4
mdbx: fix propagation child txn DBI-state to parent.
...
Change-Id: I7d92fa99131a937af1a1a75b38af57bc6787ab37
2021-01-19 23:53:16 +03:00
Leonid Yuriev
4425fb0b83
mdbx: minor refine flags-reset inside mdbx_page_flush()
.
...
This produces little bit less code for most architectures.
Change-Id: I0440ec7b465ae2f12a8b09b0226f2c42bc52f7de
2021-01-19 23:53:16 +03:00
Leonid Yuriev
5bb254e629
mdbx: allow fastpath-commit for pure nested txns with parent-spilled pages.
...
Change-Id: I471fd5e057c323e3701158761631e0a9999bf54a
2021-01-19 23:53:16 +03:00
Leonid Yuriev
8fce97dca9
mdbx: fix mdbx_cursors_eot()
.
...
Change-Id: I6021ff019f25110db96f9ef351d31a1f48b76c18
2021-01-19 23:53:16 +03:00
Leonid Yuriev
f6ff075335
mdbx: rework/speedup spill-pages list.
...
Change-Id: I97e63f8d4c82ae682e898e9b04edceb0b01d82a5
2021-01-19 23:53:16 +03:00
Leonid Yuriev
d64b81c673
mdbx: remove senseless assertions from mdbx_refund_loose()
.
...
Change-Id: I028ae6bafb9358b61287fc0201c246baf160ca03
2021-01-19 23:53:16 +03:00
Leonid Yuriev
0ab263b329
mdbx: purge deleted spilled pagenums on refund.
...
Change-Id: I325fbad82cbecb71c35dd1edd1a2abccb8108541
2021-01-19 23:53:16 +03:00
Leonid Yuriev
7bf147d8c2
mdbx: fix assertion inside mdbx_txn_commit_ex()
for nested spilled txn.
...
Change-Id: I54b37ea1b9591bdec9d8bd16d0f57280a1f9ee77
2021-01-19 23:53:16 +03:00
Leonid Yuriev
6ef7b2f588
mdbx: fix assertion inside mdbx_txn_begin_ex()
for nested txn with spilled parent.
...
Change-Id: Ie1f3cd3df6beb296a7bbdc72b39c1c4cb9105083
2021-01-19 23:53:16 +03:00
Leonid Yuriev
51ec5c442b
mdbx-make: fix missing .gz
suffix when check
target called from stochastic script.
...
Change-Id: I32892df03d59848737677f59d50e94a1a98301ad
2021-01-19 23:53:16 +03:00
Leonid Yuriev
f0d79df9b9
mdbx: fix mdbx_page_flush()
.
...
Change-Id: I467c2367f2e99ae50996d0859ae22f70c9649a2d
2021-01-19 23:53:16 +03:00
Leonid Yuriev
05958a708e
mdbx: fix minor/potential mem-page leak inside mdbx_page_unspill()
.
...
Change-Id: I4398a4d81eda494e4de9d62d81e3936c6357b744
2021-01-19 23:53:16 +03:00
Leonid Yuriev
21fbc36311
mdbx: minor refine mdbx_page_retire()
.
...
Change-Id: I29d20ed47f56e17dde8c9417bfa1ec95302c1966
2021-01-19 23:53:16 +03:00
Leonid Yuriev
cea29fe485
mdbx: fix assertion inside mdbx_page_retire()
.
...
Change-Id: I5d8f92b9fde1c961252757ea508403b5f51e7646
2021-01-19 23:53:16 +03:00
Leonid Yuriev
fe386a66df
mdbx: minor refine mdbx_page_unspill()
.
...
Change-Id: I20bbd4c502a2258b945996fa1cf761eab7f88a80
2021-01-19 23:53:16 +03:00
Leonid Yuriev
92527a5206
mdbx: rename mdbx_page_spill
to mdbx_cursor_spill()
.
...
Change-Id: I71628951d29ea39055b920a76521a19cb10ac8da
2021-01-19 23:53:16 +03:00
Leonid Yuriev
266bb70b7d
mdbx: add debug to mdbx_kill_page()
.
...
Change-Id: Ifbb3164989a19d8ea48288b4eda1a8bcf31790ff
2021-01-19 23:53:16 +03:00
Leonid Yuriev
56758372cf
mdbx: drop unused mdbx_audit()
.
...
Change-Id: I6d31c6ad83c058892319da6bbf38506b3f55085f
2021-01-19 23:53:16 +03:00
Leonid Yuriev
1314b29557
mdbx: add const
for bsearch functions.
...
Change-Id: Ie63eafa145bc8a63ae56b2693aaaf69bd21893aa
2021-01-19 23:53:16 +03:00
Leonid Yuriev
ef7814c018
mdbx: clean zero item of DPL-list.
...
Change-Id: I7c60f3996783d97cee7cf2f0f9a7b856f4272641
2021-01-19 23:53:16 +03:00
Leonid Yuriev
d50fff8410
mdbx: minor refine mdbx_page_check()
.
...
Change-Id: I325c20fe042635a0641cc24f5661408f3476139b
2021-01-19 23:53:16 +03:00
Leonid Yuriev
44089b03df
mdbx: minor refine mdbx_page_get()
.
...
Change-Id: Ie0ca17883ed88e4d9addf8b90061d25a80d77022
2021-01-19 23:53:16 +03:00
Leonid Yuriev
a906569c58
mdbx: merge branch 'master' into devel-rebase.
...
Change-Id: I96d944f283029b9c60e45683ee66b4564273b407
2021-01-19 23:51:52 +03:00
Leonid Yuriev
b98895b8c7
mdbx: fix unaligned access to bootid
on the meta-pages.
...
Assume this fixes https://github.com/erthink/libmdbx/issues/153
Change-Id: I062c1bd99795a7b875d1cf60658790c1071a6775
2021-01-18 14:27:58 +03:00
Leonid Yuriev
e766df658c
mdbx-backport: avoid 4-byte aligned (i.e. unaligned) access to 64-bit integers.
...
Historically, the page header provides 4-byte data alignment.
Therefore, unfortunately, the meta page data is also aligned on a 4-byte boundary, but contains 64-bit values.
This commit eliminates potentially unsafe access (SPARC, MIPS, etc) to these 64-bit values aligned on a 4-byte boundary.
Thus, a build with the `-fsanitize=undefined` now passes the tests both with CLANG 11 and GCC 10.
Change-Id: Ie441103e53ed96fd40507d8c0be0689e3fee69f5
2021-01-18 14:08:49 +03:00
Jens Alfke
adc7208169
mdbx-make: Added DLLs and dSYMs to clean & gitignore.
...
- Added file types .dll, .dylib and .dSYM to .gitignore
- Added above to the file types deleted by `make clean`
Resolves https://github.com/erthink/libmdbx/issues/151
2021-01-07 02:01:45 +03:00
byronhe
3a441d6d3a
Update mdbx.h
2021-01-04 17:49:25 +03:00
Leonid Yuriev
082df3a573
mdbx: refine MDBX_opt_* descriptions and defaults.
...
Change-Id: I99ddf530d5683b755bc8bab1ea1098b0cc00b181
2020-12-17 22:03:14 +03:00
Leonid Yuriev
697fce7ebc
mdbx: rename MDBX_END_PURE_COMMIT
(cosmetics).
...
Change-Id: Ia3bdeca5989c841c0dc969e22981044fb334bf32
2020-12-17 22:03:14 +03:00
Leonid Yuriev
70e76bcb4d
mdbx: merge branch 'master' into devel.
...
Change-Id: Idc8838922081cbc8ebe6c564555e4d304b529588
2020-12-17 21:52:35 +03:00
Leonid Yuriev
1ebc1e7c49
mdbx: update ChangeLog.
...
Change-Id: Ib53b3180b2b8e5437eec649aa010bdd6779d41c9
2020-12-17 17:42:35 +03:00
Leonid Yuriev
760f1654c2
mdbx-test: minor extension for jitter
test case.
...
Trivial test for https://github.com/erthink/libmdbx/issues/146 .
Change-Id: If5b365ebedf8609c9ec12569d5e5173799379195
2020-12-17 17:41:24 +03:00
Leonid Yuriev
d77af0bc1f
mdbx: more checks against the use renewed (re-created or re-opened) DBI-handles.
...
More for https://github.com/erthink/libmdbx/issues/146
Change-Id: I09e40598aca18e7ebd9798dc3be8675de3f8d976
2020-12-17 10:36:05 +03:00
Leonid Yuriev
735da5fedd
mdbx: auto-shrink env's DBI table.
...
Change-Id: I9f423dab41863119a4491491e0ecd0a4aee42a82
2020-12-17 01:57:06 +03:00