Leo Yuriev
20022658be
mdbx-tools: remove "" from printf-strings.
2018-09-13 00:52:56 +03:00
Leo Yuriev
3c87e02716
mdbx: add unlikely
for comparison result inside mdbx_cursor_set().
2018-09-12 19:51:05 +03:00
Leonid Yuriev
51b89c9690
mdbx: fix memleak after midl2 rework.
...
Change-Id: I211a1c0e2b7e0c5abc44ff82151f83f81ddda754
2018-09-12 19:51:05 +03:00
Leonid Yuriev
ee21afce1e
mdbx: fix comments typo.
...
Change-Id: Ieb8ee5d6d76457efbd54958fe9d894f752880520
2018-09-12 19:51:05 +03:00
Leo Yuriev
8966a1773c
mdbx: add C_GCFREEZE cursor's flag.
...
Change-Id: I813a2c2ac30564d8943f0cf50a601b858dda0bd9
2018-09-12 19:51:05 +03:00
Leonid Yuriev
f373a0ca84
mdbx: rework/speedup filtering of dirty-list from loose-pages inside mdbx_update_gc().
...
Change-Id: Icf4101fa77314ab79be90ee429cf2df639686d7e
2018-09-12 19:48:06 +03:00
Leonid Yuriev
8abff4773f
mdbx: rework ID2L.
...
Change-Id: Ia5b47bcceb176c994bfe59373242f8622389697e
2018-09-12 19:29:25 +03:00
Leonid Yuriev
25fc9305dd
mdbx: add MDBX_WORDBITS, update MAX_PAGENO.
...
Change-Id: Ibb0425cee9fd2870298e25f82ab094e57ac63f96
2018-09-12 19:28:51 +03:00
Leonid Yuriev
93a71c29e7
mdbx: add mdbx_mid2l_sort().
...
Change-Id: Ib70a46063611b0657b34524d268b2ee5bd9b1eb8
2018-09-12 19:27:23 +03:00
Leonid Yuriev
30b084724a
mdbx: setup mdbx_cmp_memn() as data-comparator for safety.
2018-09-12 19:25:12 +03:00
Leonid Yuriev
e3ff19a722
mdbx: check comparator for MDBX_GET_BOTH and MDBX_GET_BOTH_RANGE.
2018-09-12 19:24:34 +03:00
Leo Yuriev
f58185afa6
mdbx: don't touch mm_psize
and mm_flags
while provoking bad readers (debug-only).
2018-09-12 19:23:56 +03:00
Leo Yuriev
8364427d02
mdbx: fix concurrent opening with custom pagesize (get pagesize from meta-page early).
2018-09-12 19:22:53 +03:00
Leonid Yuriev
15a9fb9b98
mdbx-tools: refine 'mismatch idl length' error message.
...
Change-Id: I64ed835035f2318b295353f9360fc4d4da2afa28
2018-08-23 14:48:20 +03:00
Leo Yuriev
c362ad9465
mdbx: fix added limit's API.
2018-08-22 16:19:42 +03:00
Leonid Yuriev
8acc1979bb
mdbx: fix mdbx_env_get_maxkeysize() result type (minor).
...
Change-Id: I8e3a7f8c2b81b5f8ac40801313cbd6f17d2dea64
2018-08-21 22:35:53 +03:00
Leonid Yuriev
f371f10743
mdbx: one more fix/rewrite mdbx_update_gc().
...
Change-Id: I7188f1566488d239d018311286612c3117f58127
2018-08-21 22:19:20 +03:00
Leonid Yuriev
7aab221bf4
mdbx: add mdbx_txl_sort().
...
Change-Id: Idffb3b4a3fa455d125559a36cbe7c88b8a848b02
2018-08-21 22:19:20 +03:00
Leonid Yuriev
a0d10e41b8
mdbx: add mdbx_limits_xyz().
...
Change-Id: I56c79704c59386a0c4d84b001020484c23925e6c
2018-08-21 22:19:20 +03:00
Leonid Yuriev
08fa2c1746
mdbx: drop/replace PNL-constant with MDBX_LIST_MAX.
...
Change-Id: I71722f06c771ad57e3e7ca84f3d497750cae8419
2018-08-21 22:19:20 +03:00
Leonid Yuriev
0797ae2270
mdbx: set basic size of PN-lists to 2^24 for large TXN.
...
Change-Id: I6bc293d8940166da7df0a291fed8b5db794db9b9
2018-08-21 22:19:20 +03:00
Leonid Yuriev
0f63ab0385
mdbx: refine PN-lists.
...
Change-Id: Ib5ffafe634993b6f3b0fb7e35cc49f7d9b8c95a5
2018-08-21 22:19:20 +03:00
Leonid Yuriev
cb081424ff
mdbx: don't keep extra space while update on overflow-pages.
...
Change-Id: I70f2a87e0e9ec088f692021cfcfcd1b81f287e31
2018-08-21 22:19:20 +03:00
Leonid Yuriev
d3e9626a15
mdbx: fix mdbx_pnl_grow().
...
Change-Id: I414501381a0ffea91677d8e5ef696fa6f645001f
2018-08-21 22:19:20 +03:00
Leonid Yuriev
434f0d5b57
mdbx: fix/rewrite mdbx_update_gc().
...
Change-Id: I580a1ff0cbeeb529e2bcbd50d97bfba7bcf5a546
2018-08-13 01:21:07 +03:00
Leonid Yuriev
c43b7d1aba
mdbx-test: fix minor typos.
...
Change-Id: I4889a0e698bdfdda7eed257a5cd29e8b8089d102
2018-08-13 01:21:07 +03:00
Leonid Yuriev
111befb695
mdbx: refine befree-store inside freelist_save().
2018-08-12 21:19:18 +03:00
Leonid Yuriev
559e7bc8de
mdbx: fix MDBX_EKEYMISMATCH while update multi-value with MDBX_CURRENT.
2018-08-10 18:39:19 +03:00
Leonid Yuriev
1d716c043d
mdbx: fix assertions.
2018-08-10 18:33:59 +03:00
Leonid Yuriev
bc45eb30fb
mdbx: add checking result from mid2l-functions.
...
Change-Id: I8c2b4110c335b5632e4c71d6b8304f3ab437696e
2018-08-10 12:32:02 +03:00
Leonid Yuriev
c472300b13
mdbx: add MDBX_PNL_MAX and checking size of lists.
...
Change-Id: I32e31d2caf676e1e96cc4f82610544b5c5ee3a6d
2018-08-10 12:31:29 +03:00
Leonid Yuriev
b4fd29a67b
mdbx: fix assert-condition inside mdbx_pnl_xappend().
...
Change-Id: Id5ac89c85b7e673c44d60a626c805fe666d221bc
2018-08-10 09:36:03 +03:00
Leo Yuriev
e0fcd6e0ec
mdbx: add PTHREAD_MUTEX_ERRORCHECK for shared mutexes.
...
Change-Id: Ib9520b6bc68b294088298b1901278fab824ea43e
2018-08-02 18:36:45 +03:00
Leo Yuriev
6a51343b89
mdbx: fix 'db_dummy' inside mdbx_dbi_open_ex().
...
Change-Id: I70a21c9b77a43c5af749da5723fa965487a056b0
2018-08-02 11:14:46 +03:00
Leo Yuriev
d72ba6fd69
mdbx: fix Coverity warning (minor).
2018-08-01 21:31:56 +03:00
Leo Yuriev
275b80e086
mdbx: fix mdbx_page_get().
...
Fix commit 32c63077a457d3a639b47329635a374b91a5f91d
Change-Id: I7649c3c65c19013e1b367e7554fbe823ea0511d2
2018-08-01 20:45:49 +03:00
Leo Yuriev
cb70cb18fc
mdbx: use 'short' for lck-type (minor).
2018-08-01 18:31:09 +03:00
Leo Yuriev
5ed725dc29
mdbx: minor refine mdbx_txn_renew0().
2018-08-01 18:31:09 +03:00
Leo Yuriev
e06ab1d2a5
mdbx: explicit call mdbx_rpid_clear().
2018-08-01 18:31:09 +03:00
Leo Yuriev
ac54a3959d
mdbx: add fallback2shared for mdbx_lck_exclusive().
2018-08-01 18:31:09 +03:00
Leo Yuriev
5a1f388db5
mdbx: drop unused mdbx_lck_upgrade().
2018-08-01 18:16:40 +03:00
Leo Yuriev
dbf66ec0bb
mdbx: add __printf_args into defs.h
...
Change-Id: I0e6da5115bc427d04eb3ab59184152275c2a7cae
2018-07-28 17:59:56 +03:00
Leo Yuriev
32c63077a4
mdbx: check page bound inside mdbx_page_get().
...
Change-Id: I7649c3c65c19013e1b367e7554fbe823ea0511d2
2018-07-25 11:36:17 +03:00
Leo Yuriev
21858201e0
mdbx: fix nasty suspend_and_append() bug.
...
Change-Id: I043adcff2e6c040426a51b5d4b15bac849e6dd9f
2018-07-24 00:18:47 +03:00
Leo Yuriev
dfea68270a
mdbx: fix assertion inside mdbx_suspend_threads_before_remap().
...
Change-Id: If01fc5f655922c55b3955f2b00c93b80328c5232
2018-07-19 08:48:50 +03:00
Leo Yuriev
f425e98eb5
mdbx: fix mdbx_env_compact().
...
Change-Id: Ie269b45c3d0325cb1b2d82f4ed1c18f8b3fe4212
2018-07-06 15:25:14 +03:00
Leo Yuriev
20a61f273c
mdbx: set MDBX_FATAL_ERROR when mdbx_env_open() failed.
...
Change-Id: If02d670c7ce3a5dd696a87848df28ffe817c6922
2018-07-06 15:08:33 +03:00
Leo Yuriev
8e0f5bea4a
mdbx: minor fix to avoid Valgrind false-positive issue.
...
Change-Id: Ifa4dc51b500ff42a88182d750e22572aa5b2155b
2018-07-01 17:42:35 +03:00
Leo Yuriev
c9d0c8edeb
mdbx: create new files with mode=0640 inside mdbx_env_copy().
...
Change-Id: I468f0fa29d471a2e877ea20a5e61f6358347c6eb
2018-06-30 14:56:28 +03:00
Leo Yuriev
e57d4bbb00
mdbx: remove created file if mdbx_env_copy() failed.
...
Change-Id: Ie47981b6031c6e7099a5d49f6cd7338ab2c1e040
2018-06-30 14:56:28 +03:00
Leo Yuriev
797bcf9aca
mdbx: add mdbx_removefile().
...
Change-Id: I985926bdef28387d5872317a3ecf47953ce4812c
2018-06-30 14:56:28 +03:00
Leo Yuriev
ba1387b791
mdbX: add few __cold (minor).
...
Change-Id: I8b99ea4f3829c6b08355cc8de0a11962756370af
2018-06-30 14:18:36 +03:00
Leo Yuriev
d90e6187f7
mdbx: support exclusive mode without lck-file.
...
Change-Id: I1beef09d62965d0d777f579a8aa6f15c478eebd2
2018-06-30 14:15:24 +03:00
Leo Yuriev
9e81d5b631
mdbx: allow mdbx_env_compact() to fix page leaks.
...
Don't treat fixing page leaks as an error while copy DB with compactification.
Change-Id: I2a575ff9e2b24610172aaca939b5f6957c26ec77
2018-06-30 01:35:27 +03:00
Leo Yuriev
639e639fa3
mdbx_chk: fix GC check for MDBX_EXCLUSIVE/MDBX_RDONLY modes.
...
Change-Id: I40c8f8321791d0c6ddcbbfcf67f2903347d90f17
2018-06-30 00:33:22 +03:00
Leo Yuriev
f4a01da47f
mdbx: avoid weak meta inside mdbx_init_metas().
...
Change-Id: Ib9c5ab04ad8cff3ad43d94a288cecec45d7ef37d
2018-06-30 00:03:15 +03:00
Leo Yuriev
b9d3eac12e
mdbx: minor refine mdbx_env_copy().
...
Change-Id: I007add822bc4d30b7a8a838981ada6d2812f669a
2018-06-29 23:54:59 +03:00
Leo Yuriev
bc77ab3cca
mdbx: refine Coverity warning fix.
...
Change-Id: I6bbb791f32a6b64712e88e0b2dd87052e353c730
2018-06-21 18:28:30 +03:00
Leo Yuriev
31b5f64054
mdbx: bump version to v0.2.0
...
Change-Id: I113419b685c38f23c35da6790648f7f994a15f29
2018-06-21 17:54:59 +03:00
Leo Yuriev
9b39b959de
mdbx: cleanup formating (cosmetic).
...
Change-Id: I4a502fa8e43b9556318628bef05447567e5a98be
2018-06-21 17:28:42 +03:00
Leo Yuriev
40ec114048
mdbx: fix Coverity warning (minor, paranoia).
...
Change-Id: I232377a03244dc33beb4f332c0024b454027f659
2018-06-21 17:28:01 +03:00
Leonid Yuriev
b57c3b2503
mdbx: check for non-local files in non-exclusive mode.
...
Change-Id: Ibd1bbf48aba42d5ed736069d59b18ac0dd143554
2018-06-20 13:52:08 +03:00
Leonid Yuriev
f625b6cb42
mdbx: restore env-flags when env_open() failed.
...
Change-Id: I597b242c6f56c16dfef0a3d34c2113f71908cef4
2018-06-20 13:52:08 +03:00
Leo Yuriev
0dfa9cd09a
mdbx: add MDBX_EXCLUSIVE instead of mdbx_env_open_ex().
...
Change-Id: I3c817d58d971385bcd07643df14beaf7122c7836
2018-06-20 13:52:02 +03:00
Leo Yuriev
09ad941a05
mdbx: Windows XP compatibility.
...
Change-Id: Iafe3a83110610071e42a168ef9fc5f8d3131854f
2018-06-20 13:47:14 +03:00
Leo Yuriev
28eda32c12
mdbx: split-out mdbx_is_file_local().
...
Change-Id: Ib7d990c4ce19d9b14a4b6739ca321d9d2666c882
2018-06-20 13:47:14 +03:00
Leonid Yuriev
fc41cd64d1
mdbx: add MDBX_CONFIG_MANUAL_TLS_CALLBACK.
...
Change-Id: I3ed60348f532cc9206f9ec0e7c1d3428b4f037a2
2018-06-20 13:47:14 +03:00
Leo Yuriev
9f2bf6a377
mdbx: provide SRWL stub for Windows XP/2000.
...
Change-Id: I438373a4952298efc88ca4c1a92c88e173b82f98
2018-06-20 13:47:14 +03:00
Leo Yuriev
685abc7bcb
mdbx: more/again reformat by clang-format 6.0 (cosmetic).
...
Change-Id: I769ee5a80d75a49fc5bb041fefda6f22adc05424
2018-06-20 13:45:11 +03:00
Leo Yuriev
9db090087e
mdbx: reformat by clang-format 6.0 (cosmetic).
2018-06-18 21:29:12 +03:00
Leo Yuriev
93e3b4129a
mdbx-tools: fix wrong 'bad sequence' error from mdbx_stat.
2018-06-18 16:36:53 +03:00
Leo Yuriev
f314cd6b92
mdbx: windows - fix truncation race while unmap.
...
Change-Id: I93983d100c78aa3e57c5a7ebd9d5bf2a96081ed7
2018-06-15 02:54:41 +03:00
Leo Yuriev
b6e605b8da
mdbx: bump version to v0.1.5
2018-06-14 13:53:05 +03:00
Leo Yuriev
2f983b281d
mdbx: drop MDBX_DEVEL.
...
Change-Id: I5fc1a240e7909b8ecaf2ef19a83a9e59ea5609ba
2018-06-13 11:37:56 +03:00
Leo Yuriev
efdcbd8c35
mdbx: disable non-blocking DB-close under Windows.
...
Change-Id: If6579467132439b6b627e756f67f6bd35fed8b4f
2018-06-13 02:46:18 +03:00
Leo Yuriev
634efbe34b
mdbx: don't block close_env() if other write-txn running.
...
Change-Id: I1d19afcc245578681b8bc3ee3966ac38bc596ec4
2018-06-12 13:18:17 +03:00
Leo Yuriev
fdc248384e
mdbx: skip meta if usedbytes beyond oef.
...
Change-Id: I1e95136bce7169b7ed612f9746d0cdec43caca14
2018-06-01 13:27:20 +03:00
Leo Yuriev
38369bd24b
mdbx: force steady-sync when shrinking DB (fix corruption bug).
...
Change-Id: I636ee2ad04f28d4038d74bdf2c7061ab885f4b82
2018-06-01 13:15:21 +03:00
Leo Yuriev
ab4c9c9db0
mdbx: return MDBX_CORRUPTED instead of crash if MDBX_DUPSORT mismatch.
...
Change-Id: I439a3c859dbfcfbe33a3db077c3e8200a1417c31
2018-05-28 20:04:48 +03:00
Leo Yuriev
e86bd88751
mdbx: disable warning #5045 for MSVC (minor).
2018-05-21 16:31:36 +03:00
Leo Yuriev
bea1349dd4
mdbx: bump internal version info to v0.1.4
2018-05-04 13:21:18 +03:00
Leo Yuriev
d0ddc8569b
mdbx-windows: fix lck_reader_alive_check().
...
Change-Id: Icbc54d9b3003f70bba573a3807c5161380339460
2018-05-04 02:17:21 +03:00
Leo Yuriev
f1edd1579a
mdbx: fix wrong freeDB search.
...
Avoid search freeDB while tree is updating.
This resolves https://github.com/leo-yuriev/libmdbx/issues/31
Bug was inherited from LMDB.
Change-Id: I0b12f8d9b88bca5aa26ca27db81df9b72c6a19b7
2018-04-25 03:01:12 +03:00
Leo Yuriev
d127c28e83
mdbx-windows: fix srw-release if rdt-lock failed (minor/paranoia).
2018-04-12 00:56:58 +03:00
Leo Yuriev
159d676429
mdbx: fix typo in mdbx_chk output.
2018-04-10 21:12:41 +03:00
Leo Yuriev
f4a9018690
mdbx: bump internal version info to v0.1.3
...
Change-Id: I7db311c812d531f6628101715f6658005db3ea24
2018-04-03 20:37:07 +03:00
Leo Yuriev
797ae9d1db
mdbx: minor fix debug-output for mdbx_thread_key_create().
...
Change-Id: I718130cf2385b6221187cbcdeedd9d48d05289bb
2018-04-03 20:04:10 +03:00
Leo Yuriev
864be54f01
mdbx: fix/rework rthc counting.
...
Change-Id: I97fd5bd6dc1a46658138d82db10e937c9595d81f
2018-04-03 19:28:12 +03:00
Leo Yuriev
571b50622e
mdbx: restore workaround for glibc's bug #21031 .
...
Workaround for https://sourceware.org/bugzilla/show_bug.cgi?id=21031
Change-Id: I6cf9e037cc2fc298096b78ec96773f19478ed5c0
2018-04-03 17:44:18 +03:00
Leo Yuriev
36a86bbc6e
mdbx: fix cursor tracking inside mdbx_rebalance().
2018-03-26 20:20:14 +03:00
Leo Yuriev
02fc5fe158
mdbx: update internal version info.
2018-03-23 17:23:28 +03:00
Leo Yuriev
45f159ddd3
mdbx: mdbx_cursor_put(MDBX_APPEND+MDBX_NOOVERWRITE) should return MDBX_KEYEXIST instead of MDBX_EKEYMISMATCH.
...
When MDBX_APPEND is used the ordering of keys is important.
Therefore MDBX_EKEYMISMATCH should me returned when given key <= last.
On the other hand, if MDBX_NOOVERWRITE is also used
then the MDBX_KEYEXIST should be returned, but not MDBX_EKEYMISMATCH.
2018-03-23 17:21:27 +03:00
Leo Yuriev
6758348046
mdbx: import intrin-includes from t1ha.
2018-03-22 21:11:26 +03:00
Leo Yuriev
61a2c56784
mdbx: fix/rework cache-line alignment.
2018-03-22 21:11:26 +03:00
Leo Yuriev
6a074cb85a
mdbx: fix unaligned access to mp_ptrs[] on fake-page.
...
Based on http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=commitdiff;h=e77918a903d980ff789b7e32f71725481e870510
2018-03-22 21:11:26 +03:00
Leo Yuriev
dbc87a8a5e
mdbx: refine MDBX_CACHE_IS_COHERENT.
2018-03-22 20:38:20 +03:00
Leo Yuriev
c52a57dac5
mdbx: fix for MIPS cacheflush().
2018-03-22 20:37:50 +03:00
Leo Yuriev
5ce40269b3
mdbx: fix gcc warning (minor).
2018-03-22 20:37:50 +03:00
Leo Yuriev
86274513f9
mdbx: more __has_include().
2018-03-21 22:19:17 +03:00
Leo Yuriev
f5571e4027
mdbx: import byte-order macros from t1ha.
2018-03-21 22:19:17 +03:00