]> git.sur5r.net Git - openldap/commitdiff
ITS#5859 fix IDL cache for hdb DB with empty suffix
authorHoward Chu <hyc@openldap.org>
Mon, 26 Jan 2009 10:20:51 +0000 (10:20 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 26 Jan 2009 10:20:51 +0000 (10:20 +0000)
servers/slapd/back-bdb/dn2id.c

index 2a927f3a4f5e32da6d3467e12856870c0628f02c..7a022db165fcc72d51d6ca613b4dbe2dd6815a85 100644 (file)
@@ -623,6 +623,11 @@ hdb_dn2id_add(
                                tmp[1] = eip->bei_id;
                                bdb_idl_cache_add_id( bdb, db, &key, e->e_id );
                        }
+                       /* Handle DB with empty suffix */
+                       if ( !op->o_bd->be_suffix[0].bv_len && eip ) {
+                               tmp[1] = eip->bei_id;
+                               bdb_idl_cache_add_id( bdb, db, &key, e->e_id );
+                       }
                }
        }
 
@@ -722,6 +727,11 @@ func_leave:
                                tmp[1] = eip->bei_id;
                                bdb_idl_cache_del_id( bdb, db, &key, e->e_id );
                        }
+                       /* Handle DB with empty suffix */
+                       if ( !op->o_bd->be_suffix[0].bv_len && eip ) {
+                               tmp[1] = eip->bei_id;
+                               bdb_idl_cache_del_id( bdb, db, &key, e->e_id );
+                       }
                }
        }
        Debug( LDAP_DEBUG_TRACE, "<= hdb_dn2id_delete 0x%lx: %d\n", e->e_id, rc, 0 );