]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/config.c
import selected fixes/enhancements from HEAD (ITS#4387, partial ITS#4390)
[openldap] / servers / slapd / back-bdb / config.c
index 6445e5fca947186bbf55bf40078c6c6ca3598600..dd7feee8d14c8f849e90560a528e3c33ff671599 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2005 The OpenLDAP Foundation.
+ * Copyright 2000-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -272,7 +272,9 @@ bdb_online_index( void *ctx, void *arg )
        }
 
        for ( i = 0; i < bdb->bi_nattrs; i++ ) {
-               if ( bdb->bi_attrs[ i ]->ai_indexmask & BDB_INDEX_DELETING ) {
+               if ( bdb->bi_attrs[ i ]->ai_indexmask & BDB_INDEX_DELETING
+                       || bdb->bi_attrs[ i ]->ai_newmask == 0 )
+               {
                        continue;
                }
                bdb->bi_attrs[ i ]->ai_indexmask = bdb->bi_attrs[ i ]->ai_newmask;