summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/ldbtest.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-28 08:17:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:25 -0500
commit0244414a58691c3e0081777fb1372d3ed068ac8b (patch)
tree98d643a10c2bcd82523abe8a1285044f3e62c8af /source4/lib/ldb/tools/ldbtest.c
parent7cc7c553cb57a8eb0e03b623688709fd417b21e8 (diff)
downloadsamba-0244414a58691c3e0081777fb1372d3ed068ac8b.tar.gz
samba-0244414a58691c3e0081777fb1372d3ed068ac8b.tar.bz2
samba-0244414a58691c3e0081777fb1372d3ed068ac8b.zip
r2712: fixed a bug in ldbtest to make it cope with an existing index
(This used to be commit 3f776a9b5c240312f161b651201458e43a9dd6a9)
Diffstat (limited to 'source4/lib/ldb/tools/ldbtest.c')
-rw-r--r--source4/lib/ldb/tools/ldbtest.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/lib/ldb/tools/ldbtest.c b/source4/lib/ldb/tools/ldbtest.c
index 7c240a01d2..63ce738f8c 100644
--- a/source4/lib/ldb/tools/ldbtest.c
+++ b/source4/lib/ldb/tools/ldbtest.c
@@ -294,6 +294,8 @@ static void start_test_index(struct ldb_context **ldb)
printf("Starting index test\n");
+ ldb_delete(*ldb, "@INDEXLIST");
+
memset(&msg, 0, sizeof(msg));
msg.dn = strdup("@INDEXLIST");
ldb_msg_add_string(*ldb, &msg, "@IDXATTR", strdup("uid"));
@@ -404,10 +406,10 @@ static void usage(void)
srandom(1);
- start_test_index(&ldb);
-
start_test(ldb, nrecords, nsearches);
+ start_test_index(&ldb);
+
ldb_close(ldb);
return 0;