]> git.sur5r.net Git - openldap/commitdiff
Revert "Fix 6beaad52129da5353fd40c0ec48e6a78c4f71a2e"
authorHoward Chu <hyc@symas.com>
Fri, 5 Apr 2013 10:44:56 +0000 (03:44 -0700)
committerHoward Chu <hyc@symas.com>
Fri, 5 Apr 2013 10:44:56 +0000 (03:44 -0700)
This reverts commit 8eef7a4275eda8f2fa2e0d1e67c1d5cbcd91607e.
Previous commit was correct, duplicate keys should not appear here.

libraries/liblmdb/mdb.c

index 809b39fab9bc76b776e83cc2a58e79ac10b7fd57..cb3bbf540dfe82a2c3b164fd648f0b49ce29bbe2 100644 (file)
@@ -4968,8 +4968,8 @@ mdb_cursor_put(MDB_cursor *mc, MDB_val *key, MDB_val *data,
                                if (rc > 0) {
                                        rc = MDB_NOTFOUND;
                                        mc->mc_ki[mc->mc_top]++;
-                               } else if (rc < 0) {
-                                       /* new key is < last key */
+                               } else {
+                                       /* new key is <= last key */
                                        rc = MDB_KEYEXIST;
                                }
                        }