From c71ddab974eae65a8b1120de0a62d67bc62223c9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 11 Sep 2017 11:49:02 +1200 Subject: [PATCH] ldb_tdb: Remove incorrect early return from re-index 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 Reviewed-by: Garming Sam --- lib/ldb/ldb_tdb/ldb_index.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/ldb/ldb_tdb/ldb_index.c b/lib/ldb/ldb_tdb/ldb_index.c index 16b7fa00263..fb31ba509e0 100644 --- a/lib/ldb/ldb_tdb/ldb_index.c +++ b/lib/ldb/ldb_tdb/ldb_index.c @@ -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;