Leo Yuriev
121f09af22
mdbx: Merge branch 'devel'.
2017-02-16 14:36:12 +03:00
Leo Yuriev
1708025651
mdbx: don't close/lost DBI-handles on ro-txn renew/reset.
...
More for d0383e5aeeb29fc07b568a0d4b5287d539be5d0d
Also this is related to:
- https://github.com/ReOpen/ReOpenLDAP/issues/119 (its6794 regression test may fail)
- https://github.com/ReOpen/ReOpenLDAP/issues/92 (rare test060-mt-hot failures)
2017-02-16 14:23:32 +03:00
Leo Yuriev
41576e553c
mdbx: fix cursor-untrack bug.
...
Fix segfault possibility,
during closing the cursor after a write-txn.
2017-02-16 14:23:32 +03:00
Leo Yuriev
f75fa27fe6
mdbx: don't close DBI-handles from R/O txn_abort().
...
This is related to:
- https://github.com/ReOpen/ReOpenLDAP/issues/119 (its6794 regression test may fail)
- https://github.com/ReOpen/ReOpenLDAP/issues/92 (rare test060-mt-hot failures)
2017-02-15 21:09:05 +03:00
Leo Yuriev
2b924524ec
mdbx: initial mdbx_cursor_on_ first/last().
2017-02-15 21:09:05 +03:00
Leo Yuriev
d47d8c25d8
mdbx: drop unused 'flags' from mdb_env_walk().
2017-02-15 21:08:59 +03:00
Leo Yuriev
cf8ef06ebc
mdbx: 'unlikely' for DB_STALE.
2017-02-15 20:04:20 +03:00
Leo Yuriev
acdaeeab5c
mdbx: notes about free/reuse cursors.
2017-02-15 19:51:09 +03:00
Leo Yuriev
284712a9d4
mdbx: Merge branch 'devel' branch.
...
Change-Id: I7430c4078a4cba86b885db25643ddb57bf5fc6a8
2017-02-09 11:56:48 +03:00
Leo Yuriev
6f600845f3
mdbx: more for robustness free/reuse of cursors.
...
Change-Id: I6c4056bc47aea28d39701713f97694a4ebe9b582
2017-02-09 11:47:35 +03:00
Leo Yuriev
eb4eda6368
mdbx: append README.
2017-02-08 18:15:19 +03:00
Leo Yuriev
ed925640c8
mdbx: zero-length data is not an error for MDBX.
2017-02-08 16:46:05 +03:00
Leo Yuriev
16fe998f7c
mdbx: fix losing a zero-length value of sorted-dups (for libfpta).
2017-02-07 20:57:06 +03:00
Leo Yuriev
4681620e66
mdbx: don't ignore data
arg in mdb_del() for libfpta.
2017-02-02 13:15:16 +03:00
Leo Yuriev
c9b7c0f4d1
mdbx: rework mdbx_replace() for libfpta.
2017-01-31 19:16:16 +03:00
Leo Yuriev
18654ccf22
mdbx: fix MDB_CURRENT for MDB_DUPSORT in mdbx_cursor_put() for libfpta.
2017-01-31 19:16:16 +03:00
Leo Yuriev
d3518bf75b
mdbx: fix LEAF2-pages handling in mdb_cursor_count().
2017-01-31 19:16:16 +03:00
Leo Yuriev
7bf9d381ee
mdbx: minor simplify mdb_del0().
2017-01-31 19:16:16 +03:00
Leo Yuriev
61e1efeb85
mdbx: add mdbx_dbi_open_ex() for libfpta.
2017-01-31 02:52:59 +03:00
Leo Yuriev
e080be1631
mdbx: add mdbx_is_dirty() for libfpta.
2017-01-30 22:03:27 +03:00
Leo Yuriev
55c43291c6
mdbx: undef NDEBUG when MDB_DEBUG != 0.
2017-01-30 20:17:33 +03:00
Leo Yuriev
6882d9c104
mdbx: add MDBX_RESULT_FALSE and MDBX_RESULT_TRUE for libfpta.
2017-01-30 20:17:27 +03:00
Leo Yuriev
ab6cc14480
mdbx: zero-length key is not an error for MDBX.
2017-01-27 19:30:55 +03:00
Leo Yuriev
aacd468c05
mdbx: check __OPTIMIZE__ for __hot/__cold/__flatten.
2017-01-27 19:24:43 +03:00
Leo Yuriev
72de33c8e9
mdbx: use MDB_SET_KEY inside mdbx_replace() for libfpta.
2017-01-27 03:18:59 +03:00
Leo Yuriev
a148bcea70
mdbx: more checks for mdbx_replace().
2017-01-26 23:12:31 +03:00
Leo Yuriev
cc6e1c5119
mdbx: fix MDB_CURRENT for mdb_cursor_put() with MDB_DUPSORT.
2017-01-24 20:51:23 +03:00
Leo Yuriev
6aa60c61c5
mdbx: allows cursors to be free/reuse explicitly, regardless of transaction wr/ro type.
2017-01-24 20:21:51 +03:00
Leo Yuriev
8b045ab626
mdbx: MDBX_EMULTIVAL errcode for libfpta.
2017-01-24 19:10:35 +03:00
Leo Yuriev
688b711e31
mdbx: adds mdbx_get_ex() for libfpta.
2017-01-19 17:11:43 +03:00
Leo Yuriev
c2d58ea480
mdbx: Merge branch 'devel'.
2017-01-18 19:31:39 +03:00
Leo Yuriev
5bb931f7c4
mdbx: fix xflags inside mdb_cursor_put().
...
Fix xflags preparation bug from 2956095c6d
2017-01-18 19:05:48 +03:00
Leo Yuriev
14b466bd2d
mdbx: fix cursor EOF tricks.
...
LY: Don't touch cursor's C_EOF flag in functions
that don't moves the cursor.
HYC: Further fix f8ce8a82717ddefdc912fa47c07f1bdee2a3336b
Fully revert the change to GET_MULTIPLE
Change-Id: Ia8e6dc0af04e5c7b2fd1a2fc9632ccfecc01819a
2017-01-18 17:48:32 +03:00
Leo Yuriev
c4142c9a35
mdbx: refine README.
2017-01-18 16:42:31 +03:00
Leo Yuriev
ad7113419b
mdbx: CHANGES for glibc bugs #21031 and #21032 .
...
Change-Id: I621a68161dc4f47ed30c3557f19e26a4e1db42a1
2017-01-13 00:53:22 +03:00
Leo Yuriev
71ae2aba8d
mdbx: refine mdbx_cursor_eof().
...
Change-Id: I786c5f2eedb273f44fd2ef5065d200f63dfec84b
2017-01-13 00:50:15 +03:00
Howard Chu
460eb64a6f
mdbx: backport - Tweak cursor_next C_EOF check.
...
Squash of relevant commits.
HYC: Allow C_EOF flag to be stale.
LY: Fixed parenthesis arrors.
Change-Id: I5a26498763358a08f98481cacf582c881d59393d
2017-01-13 00:50:15 +03:00
Leo Yuriev
97e1d9b685
mdbx: fix mdb_cursor_last (ITS#8557).
...
This is a port of http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=commit;h=d84dee516fa4cca41b5234e95c2105eb4737dfb3
HYC: Optimize mdb_page_search_root(PS_LAST) when cursor is already
near last position, ignoring C_EOF flag for now.
LY: Fixed C_EOF check. Don't ignore it, otherwise in some cases
we got a "MDB_PAGE_NOTFOUND", instead of just "MDB_NOTFOUND".
Change-Id: I2edbf6b64403abfa830a2fcb84162125634a85d0
2017-01-13 00:50:07 +03:00
Leo Yuriev
bc0d45df09
mdbx: Merge branch 'devel'.
...
Change-Id: I7e5916ef2a9be46aa912d7c3166a372370630b6b
2017-01-09 02:06:11 +03:00
Leo Yuriev
c96cc9c567
mdbx: minor refine README.md
...
Change-Id: I7e2253fc83240b7653eac1690493dcd3ee5ebe97
2017-01-09 02:04:31 +03:00
Leo Yuriev
81861084fc
mdbx: cosmetics for README.md
...
Change-Id: I02eca38563bb26f67a434dfbecaab3d066dd3d6d
2017-01-09 01:39:16 +03:00
Leo Yuriev
17b8feac57
mdbx: adds README.md
...
Initial for https://github.com/ReOpen/libmdbx/issues/2
Change-Id: I8e2afc659a8874405a85456da9904612c5bf8089
2017-01-09 00:40:32 +03:00
Leo Yuriev
488ee06595
mdbx: adds -ffunction-sections for CFLAGS.
...
Change-Id: I38e24e9424b75424ff12e57f3906282338a95989
2017-01-08 21:47:26 +03:00
Leo Yuriev
f8a14d7d54
mdbx: Merge branch 'positive' into 'devel' branch.
2017-01-08 14:27:31 +03:00
Howard Chu
234faf9770
mdbx: backport - ITS#8558 fix mdb_load with escaped plaintext.
...
Change-Id: I8646e876190529812476bac28e244a8eb6202336
2017-01-07 23:36:14 +03:00
Leo Yuriev
1fa026f332
mdbx: adds thread's cleanup test into mtest0.
...
Change-Id: I542425e5df1fb97d15030a681bc0e5173cf3c902
2017-01-07 23:21:53 +03:00
Leo Yuriev
478b7f00d9
mdbx: refine make ci
target.
...
Change-Id: I4b50ded5cf4b03b7a10951e7d7ae2e08fd05d81b
2017-01-07 23:21:53 +03:00
Leo Yuriev
9c02fad4cd
mdbx: support glibc < 2.18 for TLS cleanup on thread termination.
...
One more for https://github.com/ReOpen/ReOpenLDAP/issues/48
against https://sourceware.org/bugzilla/show_bug.cgi?id=21031
and https://sourceware.org/bugzilla/show_bug.cgi?id=21032
It is impossible to completely fix this issue for glibc prior to 2.18,
in such case this fix just minimizes the probability of a crash.
Change-Id: If2317275928e8f6d96c2682df99989da03aedaaa
2017-01-07 21:14:47 +03:00
Leo Yuriev
02de457f3c
mdbx: more rework TLS cleanup on thread termination.
...
One more re-fix https://github.com/ReOpen/ReOpenLDAP/issues/48
Here is only part of the work for glibc >= 2.18
--
Unfortunately, the two bugs related to pthread_key_delete()
are present in all glibc versions:
1) The race condition between pthread_key_delete() and thread's
finalization path, from where a TSD-destructors are called.
Therefore some TSD-destructor(s) could be executed after that
the pthread_key_delete() was competed.
2) ld.so infrastructure does not tracks a TDS-destructors.
Therefore a lib.so could be unloaded while corresponding a
TSD-destructor(s) were even not completed or still were not called.
Change-Id: I47eba97df57fd4c7a5bf3a8f9f12d72ba898cae5
2017-01-06 18:39:03 +03:00
Leonid Yuriev
f42b6a982a
mdbx: enable C99.
2017-01-04 20:09:31 +03:00