mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
ITS#8678 temporary hack
This commit is contained in:
parent
f136773413
commit
375db33d13
@ -49,12 +49,21 @@ mdb_modify_idxflags(
|
|||||||
ap = attr_find( oldattrs, desc );
|
ap = attr_find( oldattrs, desc );
|
||||||
if ( ap ) ap->a_flags |= SLAP_ATTR_IXDEL;
|
if ( ap ) ap->a_flags |= SLAP_ATTR_IXDEL;
|
||||||
|
|
||||||
|
/* ITS#8678 FIXME
|
||||||
|
* If using 32bit hashes, or substring index, must account for
|
||||||
|
* possible index collisions. If no substring index, and using
|
||||||
|
* 64bit hashes, assume we don't need to check for collisions.
|
||||||
|
*
|
||||||
|
* In 2.5 use refcounts and avoid all of this mess.
|
||||||
|
*/
|
||||||
|
if (!slap_hash64(-1) || (ai->ai_indexmask & SLAP_INDEX_SUBSTR)) {
|
||||||
/* Find all other attrs that index to same slot */
|
/* Find all other attrs that index to same slot */
|
||||||
for ( ap = newattrs; ap; ap = ap->a_next ) {
|
for ( ap = newattrs; ap; ap = ap->a_next ) {
|
||||||
ai = mdb_index_mask( op->o_bd, ap->a_desc, &ix2 );
|
ai = mdb_index_mask( op->o_bd, ap->a_desc, &ix2 );
|
||||||
if ( ai && ix2.bv_val == ix_at.bv_val )
|
if ( ai && ix2.bv_val == ix_at.bv_val )
|
||||||
ap->a_flags |= SLAP_ATTR_IXADD;
|
ap->a_flags |= SLAP_ATTR_IXADD;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Attribute *ap;
|
Attribute *ap;
|
||||||
|
Loading…
Reference in New Issue
Block a user