Skip to content

Commit a0accc8

Browse files
committed
Fix MDB_APPEND doc
We actually compare the new key against the last key, to prevent corruption.
1 parent f1417e2 commit a0accc8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

libraries/liblmdb/lmdb.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,10 +1270,9 @@ int mdb_get(MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data);
12701270
* LMDB does nothing else with this memory, the caller is expected
12711271
* to modify all of the space requested.
12721272
* <li>#MDB_APPEND - append the given key/data pair to the end of the
1273-
* database. No key comparisons are performed. This option allows
1274-
* fast bulk loading when keys are already known to be in the
1275-
* correct order. Loading unsorted keys with this flag will cause
1276-
* data corruption.
1273+
* database. This option allows fast bulk loading when keys are
1274+
* already known to be in the correct order. Loading unsorted keys
1275+
* with this flag will cause a #MDB_KEYEXIST error.
12771276
* <li>#MDB_APPENDDUP - as above, but for sorted dup data.
12781277
* </ul>
12791278
* @return A non-zero error value on failure and 0 on success. Some possible

0 commit comments

Comments
 (0)