Bug #6780 » openldap-dn2id-modrdn-idlcache-sub.patch
servers/slapd/back-bdb/dn2id.c | ||
---|---|---|
/* Update all parents' IDL cache entries */
|
||
if ( rc == 0 && bdb->bi_idl_cache_size ) {
|
||
int tmprc;
|
||
ID tmp[2];
|
||
char *ptr = ((char *)&tmp[1])-1;
|
||
key.data = ptr;
|
||
... | ... | |
*ptr = DN_SUBTREE_PREFIX;
|
||
for (; eip && eip->bei_parent->bei_id; eip = eip->bei_parent) {
|
||
tmp[1] = eip->bei_id;
|
||
bdb_idl_cache_add_id( bdb, db, &key, e->e_id );
|
||
/* If the entry we're adding has kids (modrdn), just delete any subtree
|
||
* caches that would include this result so they are rebuilt */
|
||
tmprc = hdb_dn2id_children( op, txn, e );
|
||
if (tmprc == DB_NOTFOUND) {
|
||
bdb_idl_cache_add_id( bdb, db, &key, e->e_id );
|
||
} else {
|
||
bdb_idl_cache_del( bdb, db, &key );
|
||
}
|
||
}
|
||
/* Handle DB with empty suffix */
|
||
if ( !op->o_bd->be_suffix[0].bv_len && eip ) {
|
- « Previous
- 1
- 2
- 3
- 4
- Next »