From 1e577505eba0303abb650aa869245be74b97fc05 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 2 Dec 2004 09:05:26 +0000 Subject: [PATCH] Add CSN syntax, matching rules (to support inequality indexing) --- servers/slapd/schema_init.c | 19 +++++++++++++++++++ servers/slapd/schema_prep.c | 18 +++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index a63f3492dd..b5cf4bdfda 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -3196,6 +3196,11 @@ static slap_syntax_defs_rec syntax_defs[] = { {"( 1.3.6.1.4.1.4203.666.2.6 DESC 'UUID' )", SLAP_SYNTAX_HIDE, UUIDValidate, NULL}, + {"( 1.3.6.1.4.1.4203.666.11.2.1 DESC 'CSN' )", + SLAP_SYNTAX_HIDE, + blobValidate, /* THIS WILL CHANGE */ + NULL}, + /* OpenLDAP Void Syntax */ {"( 1.3.6.1.4.1.4203.1.1.1 DESC 'OpenLDAP void' )" , SLAP_SYNTAX_HIDE, inValidate, NULL}, @@ -3630,6 +3635,20 @@ static slap_mrule_defs_rec mrule_defs[] = { octetStringIndexer, octetStringFilter, "UUIDMatch"}, + {"( 1.3.6.1.4.1.4203.666.11.2.2 NAME 'CSNMatch' " + "SYNTAX 1.3.6.1.4.1.4203.666.11.2.1 )", + SLAP_MR_HIDE | SLAP_MR_EQUALITY | SLAP_MR_ORDERED_INDEX, NULL, + NULL, NULL, octetStringMatch, + generalizedTimeIndexer, generalizedTimeFilter, + NULL}, + + {"( 1.3.6.1.4.1.4203.666.11.2.3 NAME 'CSNOrderingMatch' " + "SYNTAX 1.3.6.1.4.1.4203.666.11.2.1 )", + SLAP_MR_HIDE | SLAP_MR_ORDERING | SLAP_MR_ORDERED_INDEX, NULL, + NULL, NULL, octetStringOrderingMatch, + NULL, NULL, + "CSNMatch" }, + {NULL, SLAP_MR_NONE, NULL, NULL, NULL, NULL, NULL, NULL, NULL } diff --git a/servers/slapd/schema_prep.c b/servers/slapd/schema_prep.c index ce794edc4a..4eca5045cc 100644 --- a/servers/slapd/schema_prep.c +++ b/servers/slapd/schema_prep.c @@ -547,9 +547,9 @@ static struct slap_schema_ad_map { offsetof(struct slap_internal_schema, si_ad_entryUUID) }, { "entryCSN", "( 1.3.6.1.4.1.4203.666.1.7 NAME 'entryCSN' " "DESC 'change sequence number of the entry content' " - "EQUALITY octetStringMatch " - "ORDERING octetStringOrderingMatch " - "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{64} " + "EQUALITY CSNMatch " + "ORDERING CSNOrderingMatch " + "SYNTAX 1.3.6.1.4.1.4203.666.11.2.1{64} " "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )", NULL, SLAP_AT_HIDE, NULL, NULL, @@ -557,9 +557,9 @@ static struct slap_schema_ad_map { offsetof(struct slap_internal_schema, si_ad_entryCSN) }, { "namingCSN", "( 1.3.6.1.4.1.4203.666.1.13 NAME 'namingCSN' " "DESC 'change sequence number of the entry naming (RDN)' " - "EQUALITY octetStringMatch " - "ORDERING octetStringOrderingMatch " - "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{64} " + "EQUALITY CSNMatch " + "ORDERING CSNOrderingMatch " + "SYNTAX 1.3.6.1.4.1.4203.666.11.2.1{64} " "SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )", NULL, SLAP_AT_HIDE, NULL, NULL, @@ -593,9 +593,9 @@ static struct slap_schema_ad_map { { "contextCSN", "( 1.3.6.1.4.1.4203.666.1.25 " "NAME 'contextCSN' " "DESC 'the largest committed CSN of a context' " - "EQUALITY octetStringMatch " - "ORDERING octetStringOrderingMatch " - "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 " + "EQUALITY CSNMatch " + "ORDERING CSNOrderingMatch " + "SYNTAX 1.3.6.1.4.1.4203.666.11.2.1{64} " "SINGLE-VALUE NO-USER-MODIFICATION USAGE dSAOperation )", NULL, SLAP_AT_HIDE, NULL, NULL, -- 2.39.5