]> git.sur5r.net Git - openldap/commitdiff
change in the IDL conversion from a list to a range
authorJong Hyuk Choi <jongchoi@openldap.org>
Thu, 18 Jul 2002 15:34:51 +0000 (15:34 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Thu, 18 Jul 2002 15:34:51 +0000 (15:34 +0000)
servers/slapd/back-bdb/idl.c

index 4c445dbc271ac7669fd4fe76ab398ae56bdcdfc8..8913404ade52b2eda0e205b9d8ab2a8f3594e1a0 100644 (file)
@@ -447,10 +447,16 @@ bdb_idl_insert_key(
                                if ( count >= BDB_IDL_DB_SIZE ) {
                                /* No room, convert to a range */
                                        lo = tmp;
+                                       hi = NOID;
                                        data.data = &hi;
-                                       rc = cursor->c_get( cursor, key, &data, DB_LAST );
+                                       rc = cursor->c_put( cursor, key, &data, DB_KEYLAST );
+                                       if ( rc != 0 ) {
+                                               err = "c_put NOID";
+                                               goto fail;
+                                       }
+                                       rc = cursor->c_get( cursor, key, &data, DB_PREV );
                                        if ( rc != 0 ) {
-                                               err = "c_get last";
+                                               err = "c_get prev";
                                                goto fail;
                                        }
                                        if ( id < lo )