Commit Graph

331 Commits

Author SHA1 Message Date
Leo Yuriev
ae92d0d671 mdbx: fixes issues detected by PVS-Studio.
See http://www.viva64.com/en/b/0422/

This is Partial for https://github.com/ReOpen/ReOpenLDAP/issues/107

Change-Id: Ic47d3cb1ff88ca0807bdd692a1e01487c70b264c
2016-08-22 14:39:45 +03:00
Leo Yuriev
bc7b9984d3 mdbx: fix copyright timestamps.
1 of 2 for https://github.com/ReOpen/libmdbx/issues/3

Change-Id: I7a0b820e092e7b0064ae22341bebcd015e37b7c7
2016-08-22 13:46:40 +03:00
Leo Yuriev
a306a1eac4 mdbx: fix assertions when debug enabled for various open/sync modes.
No bug is here, but had a wrong condition for assertion-check.

Change-Id: I6db76932e235f8212543fdd160a15cc9299d79e8
2016-08-18 17:09:09 +03:00
Leo Yuriev
ef30101347 mdbx: make ci-target without NDEBUG and with MDB_DEBUG=2.
Change-Id: I1745ee8beb2a77512d2821248c71ee0ff9653eb7
2016-08-18 17:09:09 +03:00
Leo Yuriev
7cfcc9ff7a mdbx: check assertions depending on NDEBUG.
Change-Id: I0c8ce98242e7451dd82f8abfbac70b2f4dcfa7a0
2016-08-18 17:09:09 +03:00
Leo Yuriev
9407621eba mdbx: allow CC=xyz for ci-target rules.
Change-Id: Ie5ae783ffde8293b1c6b5c1cfe90f98d829d91ae
2016-08-04 10:44:39 +03:00
Hallvard Furuseth
ac09708bfe mdbx-doc: comment MDB_page, rename mp_ksize.
Change-Id: Ia9d28a76fe0b51ccfc40ba97b913f064b81bc00e
2016-08-04 10:44:39 +03:00
Hallvard Furuseth
85612d9722 mdbx-doc: VALID_FLAGS, mm_last_pg, mt_loose_count.
Change-Id: I6c615244d8b137ac4ed67fb7be70e8ccd4e7cac4
2016-08-04 10:44:33 +03:00
Hallvard Furuseth
f627930bdc mdbx: backport - Refactor mdb_page_get().
Change-Id: I6a44000d954025f87637c8b60da85b210b4df65e
2016-07-26 17:13:06 +03:00
Hallvard Furuseth
259e21c85f mdbx: backport - Fix MDB_INTEGERKEY doc of integer types.
Change-Id: I482cb0fdc9b71368a3ee5c9842ac3bf4c9d07bc2
2016-07-26 17:05:48 +03:00
Leo Yuriev
a3a98a7a2e mdbx: fix 'mdb_copy' init warning.
Change-Id: Ifc3d0b565a0dd6d6da40e7fe2be2c9ff0f5458fb
2016-07-20 12:51:52 +03:00
Leo Yuriev
eb3a9505a3 mdbx: update CHANGES.
Change-Id: I5133d9814ca449ae46ee97179879b72b160b72d7
2016-07-18 18:35:39 +03:00
Hallvard Furuseth
dd98ab22da mdbx: backport - Add error MDB_PROBLEM, replace some MDB_CORRUPTED.
When problem is most likely in txn, not on disk.

Change-Id: Ie01d9eb32e8f250f6dd98f3fe84c38ed15593a2e
2016-07-18 18:34:59 +03:00
Hallvard Furuseth
3befcdab01 mdbx: backport - ITS#8209 fix MDB_CP_COMPACT.
Handle errors.  Fix cond_wait condition so mc_new
is the sole control var.  Drop specious cond_waits.
Do not look at 'mo' while copythr writes it.

Preserve DB flags (use metapage#1) when main DB is empty.
Fail if metapage root != actual root in output file.

Some _aligned_malloc() doc seems to think arg NULL = user error.
Don't know if posix_memalign() pointer is defined after failure.

Change-Id: Idfdc118b4848bb96bace0f29db9dcdd710b7a1f4
2016-07-18 18:34:07 +03:00
Leo Yuriev
6d99bb59a8 mdbx: use __GNUC_PREREQ and __GNUC_PREREQ.
Change-Id: Ib1927f6ab2e3397fb2a0e83a73c5c0252bc8a593
2016-06-09 15:23:47 +03:00
Leo Yuriev
9c5d029417 mdbx: clarify copyright and license.
Change-Id: Ib1b9516ce09497559937f749d520719046c5b7e6
2016-06-09 13:21:20 +03:00
Leo Yuriev
2c0f99f940 mdbx: refine makefile ci-target.
Change-Id: I48fce22ca32e45edbc519750cca50d361283f53d
2016-06-09 09:00:40 +03:00
Leo Yuriev
0e90ea1d8d mdbx: separate MDBX's features.
Change-Id: I1964ee5d8b8e5fca170b8e955bfc1a6efe25f6c5
2016-06-09 08:54:46 +03:00
Leo Yuriev
0688461bc4 mdbx: CI makefile target for fast checking.
Change-Id: Ie00a3d8d6a44a19a4afe0c369a661a2d3ad60127
2016-06-09 04:19:01 +03:00
Hallvard Furuseth
f5c61018ba mdbx: backport - mdb_env_setup_locks() Plug mutexattr leak on error.
Change-Id: Iac82f957e4961ec964d9d0a75ef0b24a9f68929c
2016-06-09 04:18:55 +03:00
Howard Chu
2806453b54 mdbx: backport - ITS#8339 Solaris 10/11 robust mutex fixes.
Check for PTHREAD_MUTEX_ROBUST_NP definition (this doesn't work
on Linux/glibc because they used an enum). Zero out mutex before
initing.

Change-Id: Ic618a6a72fbd7680dd76d5fd0aef06545dcba994
2016-06-09 03:11:05 +03:00
Leo Yuriev
3deb4577fb mdbx: fix build by clang (missing-field-initializers).
Change-Id: I45b966a6572d0669596106c3c70862dc113fb642
2016-06-06 01:53:00 +03:00
Leo Yuriev
4cbbb64e21 mdbx: ban the compilers older than GCC 4.2 or incompatible with it.
Change-Id: I30cfc04b086116652b3c40d76e1def8428b0dcd7
2016-06-06 01:46:21 +03:00
Leo Yuriev
ba943fcff2 mdbx: refine & clarify Makefile.
Change-Id: I4e5b388c65872d4cd413d0ff30f232ed0ad2112d
2016-06-01 01:58:23 +03:00
Leo Yuriev
daba18111b mdbx: cleanup tools from Windows.
Change-Id: I8c226a866dbc7081e57af3d6ec687b9cbea2684f
2016-05-30 16:28:12 +03:00
Leo Yuriev
701d3767f2 mdbx: Merge branch 'devel'. 2016-05-19 22:13:55 +03:00
Leo Yuriev
f943bbf91c mdbx: more for ASAN.
Change-Id: I2bd0573cfe4c7822fa8f3cf94db60b684964a40d
2016-05-19 22:05:46 +03:00
Howard Chu
856f30b52c mdbx: backport - ITS#8424 init cursor in mdb_env_cwalk.
Change-Id: I979b6f492c56d1c61ce233727ff058df48f327d1
2016-05-16 17:46:45 +03:00
Leo Yuriev
e84b420227 mdbx: minor (cleanup non-ascii).
Change-Id: I46dc4f4fb3c984210d65fa31af65f570a98f4813
2016-05-10 16:47:17 +03:00
Leo Yuriev
09d7904317 mdbx: clarify ov-pages copying in cursor_put().
Change-Id: I48ae57579a7d68178ec1857785ffdd6f0c0f7e13
2016-05-10 13:21:38 +03:00
Hallvard Furuseth
1ef0106b51 mdbx: backport - Comment ovpage code in mdb_cursor_put().
Change-Id: I6b3bff87dc49135fdda3e9ce0a505822ab26d3d5
2016-05-10 13:15:05 +03:00
Leo Yuriev
6191b46ca1 mdbx: Merge branch 'devel'. 2016-05-09 08:36:48 +03:00
Leo Yuriev
7c3c28239c mdbx: more likely/unlikely for mdb_node_add.
Change-Id: I1f241c6cea55db6fed744ba9f6f5733f6622015f
2016-05-08 02:29:59 +03:00
Leo Yuriev
4d3e349c16 mdbx: don't memcpy when src eq dest.
Workaround for 'destination overlaps source' from Valgrind.

Change-Id: Ib12eacbd224057334311816346ea0ccece2b42cf
2016-05-07 23:44:41 +03:00
Leo Yuriev
8791e3243f mdbx: workaround for pthread_setspecific's memleak.
Change-Id: I8b48548a40bb2fe58db14b8f6944f5a3802ffbb9
2016-05-07 15:21:59 +03:00
Leo Yuriev
14b3afdcff mdbx: notify OOM-handler about end of loop.
Change-Id: I71d66e371df869560801e12b8b06c4f4cbf90e98
2016-05-07 03:52:04 +03:00
Leo Yuriev
bfc6900b07 mdbx: reporting 'Free pages' -> 'Unallocated'.
Change-Id: I31ef11250139e3ec97240610b40b5f0ec7deaa6c
2016-05-07 03:22:42 +03:00
Leo Yuriev
bbf8a047fc mdbx: release 0.9.19
re-release v0.9.19 with a few commits,
that were missed previously.

Change-Id: Ia22eb6c3fd35c80596705326ae46f167c8cc3d73
2016-05-06 05:22:56 +03:00
Leo Yuriev
c7ff2fbb9a mdbx: Merge branch 'devel'. 2016-05-06 05:20:06 +03:00
Leo Yuriev
f70d6638c5 mdbx: MDBX_ALLOC_KICK for freelist backlog.
Tries to sync only when all pages was allocated,
but not every time reclaiming had stopped at weak checkpoint.

Change-Id: I0b41fd87f1eab4725379a17fc29e16820122467d
2016-05-06 04:53:14 +03:00
Leo Yuriev
65354dcd01 mdbx: lifo-reclaimig for weak-to-steady conversion.
Change-Id: Id078c434cf3a624331c53f6b38ce34e31dc65aa5
2016-05-06 04:50:51 +03:00
Leo Yuriev
f335c13b45 mdbx: clarify mdbx_oomkick() for LMDB-mode.
Change-Id: I6e38a1e2892084f8a5f98af7f947c1c9d2f18b9c
2016-05-06 04:13:29 +03:00
Philipp Storz
cdd7eadce7 mdbx: be a bit more precise that mdb_get retrieves data (ITS#8386).
Change-Id: I91f6fa0cf7c98ed113ff8d51387376a1c18dc231
2016-05-06 02:58:19 +03:00
Leo Yuriev
cea2e33d05 mdbx: minor fix yota's tests.
Change-Id: Id10afffa11b01b849e6e42b12f8396e29e1ae484
2016-05-06 02:58:19 +03:00
Leo Yuriev
ba3bd76a22 mdbx: sync CHANGES with LMDB-0.9.19.
Change-Id: I0e185caab97598215299fee6bb449bc4c41671a0
2016-05-04 22:31:58 +03:00
Leo Yuriev
599069b2c4 mdbx: remove needless assert.
Change-Id: I0129a9e2cd8bda4c541d8b610bcf3f887ddcb75b
2016-05-04 22:31:58 +03:00
Leo Yuriev
2dd9638321 mdbx: refine find_oldest() and oom_kick().
Change-Id: I758eba1a93550b687bbec6bf90e5b2d48090af25
2016-05-04 22:31:58 +03:00
Leo Yuriev
50f5475185 mdbx: don't mimics the MDBX's features for MDB.
Change-Id: Ie3865434c741da77b9a285e43b7d6a1d9ec0c5e2
2016-05-04 22:30:11 +03:00
Leo Yuriev
3294da86d7 mdbx: fix typo for clang.
Change-Id: I6973be51cbe04dba0dd993eec9dcfd641919eb83
2016-04-28 08:20:04 +03:00
Leo Yuriev
535dd9eb8c mdbx: reporting 'reading' -> 'detaited'.
Change-Id: I0a88e1b27458e2aba7d6f5249ed779af3dda3a0f
2016-04-27 20:06:26 +03:00