diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-08-09 16:54:36 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-08-09 11:56:23 +0200 |
commit | 0e9cf380eaae413b904503bc9676f965ef71ef16 (patch) | |
tree | 1da8349c23d099144895322d333a8d82fccc7999 | |
parent | 6853b3a805938ca6fdc69a35d9fdcefb1338101f (diff) | |
download | samba-0e9cf380eaae413b904503bc9676f965ef71ef16.tar.gz samba-0e9cf380eaae413b904503bc9676f965ef71ef16.tar.bz2 samba-0e9cf380eaae413b904503bc9676f965ef71ef16.zip |
s4-dsdb: added SAMDB_INDEXING_VERSION to @INDEXLIST
this can be used to force re-indexing of samdb when we change
something that affects index comparison, in this case the
canonicalisation of booleans
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source4/dsdb/schema/schema_set.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index 1c1e45ef78..c5ac6127d1 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -30,6 +30,11 @@ #include "librpc/gen_ndr/ndr_misc.h" #include "lib/util/tsort.h" +/* change this when we change something in our schema code that + * requires a re-index of the database + */ +#define SAMDB_INDEXING_VERSION "2" + /* override the name to attribute handler function */ @@ -95,6 +100,12 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem goto op_error; } + + ret = ldb_msg_add_string(msg_idx, "@IDXVERSION", SAMDB_INDEXING_VERSION); + if (ret != LDB_SUCCESS) { + goto op_error; + } + for (attr = schema->attributes; attr; attr = attr->next) { const char *syntax = attr->syntax->ldb_syntax; |