From 2cd08c14a014a9326c6f42b83b4f2187bd2165b2 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 11 Dec 2006 15:49:39 +0000 Subject: r20106: Optional ONE Level indexing for ldb_tdb To activate it you must modify the @INDEXLIST object adding the attribute @IDXONE: 1 Ldb test included Simo. (This used to be commit ea111795f4016916473ccc05d23c6655e6af1207) --- source4/lib/ldb/tests/test-tdb-features.sh | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'source4/lib/ldb/tests') diff --git a/source4/lib/ldb/tests/test-tdb-features.sh b/source4/lib/ldb/tests/test-tdb-features.sh index 6f1afdcf33..09a46d833e 100644 --- a/source4/lib/ldb/tests/test-tdb-features.sh +++ b/source4/lib/ldb/tests/test-tdb-features.sh @@ -117,3 +117,54 @@ checkcount 1 '(test=foo)' checkcount 0 '(test=FOO)' checkcount 1 '(test=f*o*)' +checkone() { + count=$1 + base="$2" + expression="$3" + n=`bin/ldbsearch -s one -b "$base" "$expression" | grep '^dn' | wc -l` + if [ $n != $count ]; then + echo "Got $n but expected $count for $expression" + $VALGRIND bin/ldbsearch -s one -b "$base" "$expression" + exit 1 + fi + echo "OK: $count $expression" +} + +echo "Removing wildcard attribute" +cat <