ldb_tdb: Remove incorrect early return from re-index
authorAndrew Bartlett <abartlet@samba.org>
Sun, 10 Sep 2017 23:49:02 +0000 (11:49 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 22 Sep 2017 19:20:24 +0000 (21:20 +0200)
The ltdb->cache->attribute_indexes test is not correct with the GUID index mode
so for consistency remove it.  This will make re-index on a large un-indexed
database slower, but that is better than making the wrong choice on a large
GUID-indexed database.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
lib/ldb/ldb_tdb/ldb_index.c

index 16b7fa0026384575acbaa6e54f6ea15e512cc513..fb31ba509e0a358de819cbb1fc8e5a982eb53362 100644 (file)
@@ -2496,11 +2496,6 @@ int ltdb_reindex(struct ldb_module *module)
                return LDB_ERR_OPERATIONS_ERROR;
        }
 
-       /* if we don't have indexes we have nothing todo */
-       if (!ltdb->cache->attribute_indexes) {
-               return LDB_SUCCESS;
-       }
-
        ctx.module = module;
        ctx.error = 0;