mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 08:39:37 -05:00
Merge remote-tracking branch 'origin/mdb.RE/0.9'
This commit is contained in:
commit
7a30ce8c08
2 changed files with 33 additions and 16 deletions
|
|
@ -1,11 +1,13 @@
|
|||
LMDB 0.9 Change Log
|
||||
|
||||
LMDB 0.9.19 Release Engineering
|
||||
Tweak Win32 error message buffer
|
||||
Fix MDB_GET_BOTH on non-dup record (ITS#8393)
|
||||
Optimize mdb_drop
|
||||
Fix xcursors after mdb_cursor_del (ITS#8406)
|
||||
Fix MDB_NEXT_DUP after mdb_cursor_del (ITS#8412)
|
||||
Fix mdb_env_cwalk cursor init (ITS#8424)
|
||||
Fix robust mutexes on Solaris 10/11 (ITS#8339)
|
||||
Tweak Win32 error message buffer
|
||||
Fix MDB_GET_BOTH on non-dup record (ITS#8393)
|
||||
Optimize mdb_drop
|
||||
Fix xcursors after mdb_cursor_del (ITS#8406)
|
||||
Fix MDB_NEXT_DUP after mdb_cursor_del (ITS#8412)
|
||||
|
||||
LMDB 0.9.18 Release (2016/02/05)
|
||||
Fix robust mutex detection on glibc 2.10-11 (ITS#8330)
|
||||
|
|
|
|||
|
|
@ -257,7 +257,8 @@ typedef SSIZE_T ssize_t;
|
|||
# else
|
||||
# define MDB_USE_ROBUST 1
|
||||
/* glibc < 2.12 only provided _np API */
|
||||
# if defined(__GLIBC__) && GLIBC_VER < 0x02000c
|
||||
# if (defined(__GLIBC__) && GLIBC_VER < 0x02000c) || \
|
||||
(defined(PTHREAD_MUTEX_ROBUST_NP) && !defined(PTHREAD_MUTEX_ROBUST))
|
||||
# define PTHREAD_MUTEX_ROBUST PTHREAD_MUTEX_ROBUST_NP
|
||||
# define pthread_mutexattr_setrobust(attr, flag) pthread_mutexattr_setrobust_np(attr, flag)
|
||||
# define pthread_mutex_consistent(mutex) pthread_mutex_consistent_np(mutex)
|
||||
|
|
@ -4620,15 +4621,25 @@ mdb_env_setup_locks(MDB_env *env, char *lpath, int mode, int *excl)
|
|||
#else /* MDB_USE_POSIX_MUTEX: */
|
||||
pthread_mutexattr_t mattr;
|
||||
|
||||
if ((rc = pthread_mutexattr_init(&mattr))
|
||||
|| (rc = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED))
|
||||
#ifdef MDB_ROBUST_SUPPORTED
|
||||
|| (rc = pthread_mutexattr_setrobust(&mattr, PTHREAD_MUTEX_ROBUST))
|
||||
#endif
|
||||
|| (rc = pthread_mutex_init(env->me_txns->mti_rmutex, &mattr))
|
||||
|| (rc = pthread_mutex_init(env->me_txns->mti_wmutex, &mattr)))
|
||||
/* Solaris needs this before initing a robust mutex. Otherwise
|
||||
* it may skip the init and return EBUSY "seems someone already
|
||||
* inited" or EINVAL "it was inited differently".
|
||||
*/
|
||||
memset(env->me_txns->mti_rmutex, 0, sizeof(*env->me_txns->mti_rmutex));
|
||||
memset(env->me_txns->mti_wmutex, 0, sizeof(*env->me_txns->mti_wmutex));
|
||||
|
||||
if ((rc = pthread_mutexattr_init(&mattr)))
|
||||
goto fail;
|
||||
|
||||
rc = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED);
|
||||
#ifdef MDB_ROBUST_SUPPORTED
|
||||
if (!rc) rc = pthread_mutexattr_setrobust(&mattr, PTHREAD_MUTEX_ROBUST);
|
||||
#endif
|
||||
if (!rc) rc = pthread_mutex_init(env->me_txns->mti_rmutex, &mattr);
|
||||
if (!rc) rc = pthread_mutex_init(env->me_txns->mti_wmutex, &mattr);
|
||||
pthread_mutexattr_destroy(&mattr);
|
||||
if (rc)
|
||||
goto fail;
|
||||
#endif /* _WIN32 || MDB_USE_POSIX_SEM */
|
||||
|
||||
env->me_txns->mti_magic = MDB_MAGIC;
|
||||
|
|
@ -6635,8 +6646,13 @@ current:
|
|||
/* Note - this page is already counted in parent's dirty_room */
|
||||
rc2 = mdb_mid2l_insert(mc->mc_txn->mt_u.dirty_list, &id2);
|
||||
mdb_cassert(mc, rc2 == 0);
|
||||
/* Currently we make the page look as with put() in the
|
||||
* parent txn, in case the user peeks at MDB_RESERVEd
|
||||
* or unused parts. Some users treat ovpages specially.
|
||||
*/
|
||||
if (!(flags & MDB_RESERVE)) {
|
||||
/* Copy end of page, adjusting alignment so
|
||||
/* Skip the part where LMDB will put *data.
|
||||
* Copy end of page, adjusting alignment so
|
||||
* compiler may copy words instead of bytes.
|
||||
*/
|
||||
off = (PAGEHDRSZ + data->mv_size) & -sizeof(size_t);
|
||||
|
|
@ -8885,7 +8901,7 @@ mdb_env_cthr_toggle(mdb_copy *my, int st)
|
|||
static int ESECT
|
||||
mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags)
|
||||
{
|
||||
MDB_cursor mc;
|
||||
MDB_cursor mc = {0};
|
||||
MDB_txn *txn = my->mc_txn;
|
||||
MDB_node *ni;
|
||||
MDB_page *mo, *mp, *leaf;
|
||||
|
|
@ -8898,7 +8914,6 @@ mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags)
|
|||
return MDB_SUCCESS;
|
||||
|
||||
mc.mc_snum = 1;
|
||||
mc.mc_top = 0;
|
||||
mc.mc_txn = txn;
|
||||
|
||||
rc = mdb_page_get(my->mc_txn, *pg, &mc.mc_pg[0], NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue