mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
SLAP_NVALUES: index normalized values
This commit is contained in:
parent
2bd7c30d5f
commit
47b18c9a51
@ -356,8 +356,14 @@ bdb_index_entry(
|
|||||||
|
|
||||||
/* add each attribute to the indexes */
|
/* add each attribute to the indexes */
|
||||||
for ( ; ap != NULL; ap = ap->a_next ) {
|
for ( ; ap != NULL; ap = ap->a_next ) {
|
||||||
rc = bdb_index_values( be, txn,
|
#ifdef SLAP_NVALUES
|
||||||
ap->a_desc, ap->a_vals, e->e_id, op );
|
rc = bdb_index_values( be, txn, ap->a_desc,
|
||||||
|
ap->a_nvals ? ap->a_nvals : ap->a_vals,
|
||||||
|
e->e_id, op );
|
||||||
|
#else
|
||||||
|
rc = bdb_index_values( be, txn, ap->a_desc,
|
||||||
|
ap->a_vals, e->e_id, op );
|
||||||
|
#endif
|
||||||
|
|
||||||
if( rc != LDAP_SUCCESS ) {
|
if( rc != LDAP_SUCCESS ) {
|
||||||
#ifdef NEW_LOGGING
|
#ifdef NEW_LOGGING
|
||||||
|
@ -209,7 +209,12 @@ int bdb_modify_internal(
|
|||||||
/* start with deleting the old index entries */
|
/* start with deleting the old index entries */
|
||||||
for ( ap = save_attrs; ap != NULL; ap = ap->a_next ) {
|
for ( ap = save_attrs; ap != NULL; ap = ap->a_next ) {
|
||||||
if ( ap->a_flags & SLAP_ATTR_IXDEL ) {
|
if ( ap->a_flags & SLAP_ATTR_IXDEL ) {
|
||||||
rc = bdb_index_values( be, tid, ap->a_desc, ap->a_vals,
|
rc = bdb_index_values( be, tid, ap->a_desc,
|
||||||
|
#ifdef SLAP_NVALUES
|
||||||
|
ap->a_nvals ? ap->a_nvals : ap->a_vals,
|
||||||
|
#else
|
||||||
|
ap->a_vals,
|
||||||
|
#endif
|
||||||
e->e_id, SLAP_INDEX_DELETE_OP );
|
e->e_id, SLAP_INDEX_DELETE_OP );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
attrs_free( e->e_attrs );
|
attrs_free( e->e_attrs );
|
||||||
@ -232,7 +237,12 @@ int bdb_modify_internal(
|
|||||||
/* add the new index entries */
|
/* add the new index entries */
|
||||||
for ( ap = e->e_attrs; ap != NULL; ap = ap->a_next ) {
|
for ( ap = e->e_attrs; ap != NULL; ap = ap->a_next ) {
|
||||||
if (ap->a_flags & SLAP_ATTR_IXADD) {
|
if (ap->a_flags & SLAP_ATTR_IXADD) {
|
||||||
rc = bdb_index_values( be, tid, ap->a_desc, ap->a_vals,
|
rc = bdb_index_values( be, tid, ap->a_desc,
|
||||||
|
#ifdef SLAP_NVALUES
|
||||||
|
ap->a_nvals ? ap->a_nvals : ap->a_vals,
|
||||||
|
#else
|
||||||
|
ap->a_vals,
|
||||||
|
#endif
|
||||||
e->e_id, SLAP_INDEX_ADD_OP );
|
e->e_id, SLAP_INDEX_ADD_OP );
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
attrs_free( e->e_attrs );
|
attrs_free( e->e_attrs );
|
||||||
|
Loading…
Reference in New Issue
Block a user