components/openldap/patches/06-mdb-reopen.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Thu, 20 Apr 2017 17:19:14 -0700
changeset 7922 69b30f58131b
parent 5911 a8d897c4c442
permissions -rw-r--r--
Close of build 123.

Fixes problem with mdb reopen issue in the latest OpenLDAP 2.4.44 release.
Patch was developed in-house; it is Solaris specific and
will not be contributed upstream.

--- openldap-2.4.44/libraries/liblmdb/mdb.c.old	Wed Jan 13 15:03:32 2016
+++ openldap-2.4.44/libraries/liblmdb/mdb.c	Wed Jan 13 15:04:00 2016
@@ -4619,6 +4619,10 @@
 #else	/* MDB_USE_POSIX_MUTEX: */
 		pthread_mutexattr_t mattr;

+		/* destroy mti_rmutex and mti_wmutex if they were previously initialized */
+		(void) pthread_mutex_destroy(env->me_txns->mti_rmutex);
+		(void) pthread_mutex_destroy(env->me_txns->mti_wmutex); 
+
 		if ((rc = pthread_mutexattr_init(&mattr))
 			|| (rc = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED))
 #ifdef MDB_ROBUST_SUPPORTED