https://bugzilla.redhat.com/show_bug.cgi?id=697081
Specify multiple nsMatchingRule values for an index: nsMatchingRule: value ... nsMatchingRule: valueN Some of the values will be silently lost if the total length of the string of values exceeds 1024 bytes. There should be no limit.
The buffer can be increased, but not easily set to unlimited. Are you really using OIDs that are longer 1024 characters? Just curious, as I've never seen an OID even close to this length.
Thanks, Mark
Replying to [comment:6 mreynolds]:
You could dynamically allocate a necessary sized buffer tmpMatchingRulesStr instead of using an static array on the stack? (and free it when it's done?)
The buffer can be increased, but not easily set to unlimited. Are you really using OIDs that are longer 1024 characters? Just curious, as I've never seen an OID even close to this length. Thanks, Mark
It's not just a single OID - the nsMatchingRule attribute value can be used to specify multiple different indexes - I ran into this issue when doing matching rule index testing e.g. try to specify a matching rule index for every supported language * each type of index (eq, substring, etc.)
static int ldbm_index_parse_entry(ldbm_instance inst, Slapi_Entry e, if (NULL == attrValue->bv_val || strlen(attrValue->bv_val) == 0) { already have the len in attrValue->bv_len - no need to do a strlen()
ldbm_instance_index_config_modify_callback After checking for a valid config, I think you can just pass the entryAfter to attr_index_config - this will in effect replace the current index with the index config from entryAfter
ldbm_instance_config_add_index_entry looks like the code is copying the Slapi_Entry to a string, then passing the string to ldbm_config_add_dse_entry()? Do we need another api that we can use to just pass in the Slapi_Entry instead of converting it to a string?
one minor comment: {{{ 281 for (j = slapi_attr_first_value(attr, &sval); j != -1;j = slapi_attr_next_value(attr, j, &sval), mr_count++); }}} should use slapi_attr_get_numvalues() instead. Otherwise, looks good.
final final revision 0001-Ticket-55-Limit-of-1024-characters-for-nsMatchingRul.patch
Made the change, and pushed.
Thanks for the review Rich!
[mareynol@localhost slapd]$ git merge ticket55 Updating e72f4b2..094709a Fast-forward ldap/servers/slapd/back-ldbm/instance.c | 131 +++-- ldap/servers/slapd/back-ldbm/ldbm_attr.c | 324 ++++++----- ldap/servers/slapd/back-ldbm/ldbm_config.h | 3 +- ldap/servers/slapd/back-ldbm/ldbm_index_config.c | 681 ++++------------------ ldap/servers/slapd/back-ldbm/ldif2ldbm.c | 39 +- ldap/servers/slapd/back-ldbm/proto-back-ldbm.h | 2 +- 6 files changed, 396 insertions(+), 784 deletions(-) [mareynol@localhost slapd]$ git push origin master Counting objects: 23, done. Delta compression using up to 4 threads. Compressing objects: 100% (12/12), done. Writing objects: 100% (12/12), 4.94 KiB, done. Total 12 (delta 10), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git e72f4b2..094709a master -> master
commit changeset:2a0b622/389-ds-base Author: Rich Megginson rmeggins@redhat.com Date: Wed Feb 1 19:50:00 2012 -0700 Fix Description: ENTRYRDN was changed to ENTRYDN - fixed
Added initial screened field value.
Metadata Update from @rmeggins: - Issue assigned to mreynolds - Issue set to the milestone: 1.2.10.rc1
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/55
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)
Login to comment on this ticket.