]> git.sur5r.net Git - openldap/commitdiff
Revert previous commit, it breaks everything.
authorHoward Chu <hyc@openldap.org>
Thu, 25 Nov 2004 07:03:43 +0000 (07:03 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 25 Nov 2004 07:03:43 +0000 (07:03 +0000)
servers/slapd/back-bdb/idl.c

index 505cfd4cfa5497b11f2b84b2f692dce0be8a912d..1e1453822d155ccd76540d20fcdae4c23c24ec00 100644 (file)
@@ -724,9 +724,14 @@ bdb_idl_insert_key(
                                }
                        }
                        if ( id < lo || id > hi ) {
-                               /* Replace the current lo/hi */
+                               /* Delete the current lo/hi */
+                               rc = cursor->c_del( cursor, 0 );
+                               if ( rc != 0 ) {
+                                       err = "c_del";
+                                       goto fail;
+                               }
                                data.data = &id;
-                               rc = cursor->c_put( cursor, key, &data, DB_CURRENT );
+                               rc = cursor->c_put( cursor, key, &data, DB_KEYFIRST );
                                if ( rc != 0 ) {
                                        err = "c_put lo/hi";
                                        goto fail;