]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-mdb/index.c
Fix prev commit
[openldap] / servers / slapd / back-mdb / index.c
index b00ad3160d042c22ccfa2814ca149d7f2a0a53ef..51a14811eecda63c2f5987bc4c738c9391721a8c 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2013 The OpenLDAP Foundation.
+ * Copyright 2000-2014 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -191,8 +191,10 @@ static int indexer(
        if ( opid == SLAP_INDEX_ADD_OP ) {
 #ifdef MDB_TOOL_IDL_CACHING
                if (( slapMode & SLAP_TOOL_QUICK ) && slap_tool_thread_max > 2 ) {
+                       AttrIxInfo *ax = (AttrIxInfo *)LDAP_SLIST_FIRST(&op->o_extra);
+                       ax->ai_ai = ai;
                        keyfunc = mdb_tool_idl_add;
-                       mc = (MDB_cursor *)ai;
+                       mc = (MDB_cursor *)ax;
                } else
 #endif
                        keyfunc = mdb_idl_insert_keys;