From 0244414a58691c3e0081777fb1372d3ed068ac8b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 28 Sep 2004 08:17:20 +0000 Subject: r2712: fixed a bug in ldbtest to make it cope with an existing index (This used to be commit 3f776a9b5c240312f161b651201458e43a9dd6a9) --- source4/lib/ldb/tools/ldbtest.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/lib') 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; -- cgit