From 3a8b67d06cf631f4d883ce40859401eb760bb0f3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 23 Nov 2010 20:19:49 +1100 Subject: s4-ldb: added an environment varibale LDB_WARN_UNINDEXED when LDB_WARN_UNINDEXED is set, we produce warnings about unindexed searches. This makes it easier to find performance problems caused by unindexed searches. --- source4/lib/ldb/ldb_tdb/ldb_tdb.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/ldb/ldb_tdb/ldb_tdb.c') diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index 2e88989d57..066d4085bb 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -1463,6 +1463,10 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url, return LDB_ERR_OPERATIONS_ERROR; } + if (getenv("LDB_WARN_UNINDEXED")) { + ltdb->warn_unindexed = true; + } + ltdb->sequence_number = 0; module = ldb_module_new(ldb, ldb, "ldb_tdb backend", <db_ops); -- cgit