From: Gary Lockyer Date: Tue, 27 Feb 2018 22:47:58 +0000 (+1300) Subject: ldb_tdb: Do not give the warning of duplicate attributes in truncation X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=1d86a0895aab42323e3455b33eb849198b0f7b49;p=metze%2Fsamba%2Fwip.git ldb_tdb: Do not give the warning of duplicate attributes in truncation In the truncation case a duplicate is perfectly expected. Signed-off-by: Gary Lockyer Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/ldb_tdb/ldb_index.c b/lib/ldb/ldb_tdb/ldb_index.c index 9c595f243388..343d95a7c9f1 100644 --- a/lib/ldb/ldb_tdb/ldb_index.c +++ b/lib/ldb/ldb_tdb/ldb_index.c @@ -2191,7 +2191,7 @@ static int ltdb_index_add1(struct ldb_module *module, * forcing in the value with * LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK */ - if (exact != NULL) { + if (exact != NULL && truncation == KEY_NOT_TRUNCATED) { /* This can't fail, gives a default at worst */ const struct ldb_schema_attribute *attr = ldb_schema_attribute_by_name(