1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

r20684: if we don't have any indexes, then we should not waste time

to traverse the whole tdb and unpack each record

metze
This commit is contained in:
Stefan Metzmacher 2007-01-11 12:18:17 +00:00 committed by Gerald (Jerry) Carter
parent 55f845377c
commit 492c79de13

View File

@ -1323,6 +1323,11 @@ int ltdb_reindex(struct ldb_module *module)
return -1;
}
/* if we don't have indexes we have nothing todo */
if (ltdb->cache->indexlist->num_elements == 0) {
return 0;
}
/* now traverse adding any indexes for normal LDB records */
ret = tdb_traverse(ltdb->tdb, re_index, module);
if (ret == -1) {