From: Howard Chu Date: Sun, 22 Jul 2012 22:44:11 +0000 (-0700) Subject: Append tweak: must init mdb->mi_nextid X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2265d2bac8b24c0bf2392677948f0a54d66dac1a;p=openldap Append tweak: must init mdb->mi_nextid Otherwise duplicate entries aren't detected --- diff --git a/servers/slapd/back-mdb/tools.c b/servers/slapd/back-mdb/tools.c index 4a53962ecc..ec62c50cc3 100644 --- a/servers/slapd/back-mdb/tools.c +++ b/servers/slapd/back-mdb/tools.c @@ -619,6 +619,10 @@ ID mdb_tool_entry_put( text->bv_val, 0, 0 ); return NOID; } + if ( !mdb->mi_nextid ) { + ID dummy; + mdb_next_id( be, idcursor, &dummy ); + } rc = mdb_cursor_open( txn, mdb->mi_dn2id, &mcp ); if( rc != 0 ) { snprintf( text->bv_val, text->bv_len,