svn commit: samba r20684 - in
branches/SAMBA_4_0/source/lib/ldb/ldb_tdb: .
metze at samba.org
metze at samba.org
Thu Jan 11 12:18:17 GMT 2007
Author: metze
Date: 2007-01-11 12:18:17 +0000 (Thu, 11 Jan 2007)
New Revision: 20684
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20684
Log:
if we don't have any indexes, then we should not waste time
to traverse the whole tdb and unpack each record
metze
Modified:
branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c 2007-01-11 11:11:34 UTC (rev 20683)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c 2007-01-11 12:18:17 UTC (rev 20684)
@@ -1323,6 +1323,11 @@
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) {
More information about the samba-cvs
mailing list