diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-01-11 12:18:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:40:22 -0500 |
commit | 930fca1c9728f5ba1f9f3bff003c23c508960c2d (patch) | |
tree | a421fa376c00fe65fdfabc201f60a6fb457fdf8f | |
parent | bd96c74e144262643d3edb899c68583765ee0865 (diff) | |
download | samba-930fca1c9728f5ba1f9f3bff003c23c508960c2d.tar.gz samba-930fca1c9728f5ba1f9f3bff003c23c508960c2d.tar.bz2 samba-930fca1c9728f5ba1f9f3bff003c23c508960c2d.zip |
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 used to be commit 492c79de13eab8db6079f880a8f0857dc7a29fa8)
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_index.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c index fd61d41037..f6dc997f3a 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_index.c +++ b/source4/lib/ldb/ldb_tdb/ldb_index.c @@ -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) { |