From dcccd8a89aebb10e437fb013dd0a46ed943b6abc Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 8 Dec 2014 03:21:09 +0000 Subject: [PATCH 1/3] Clarify mdb_dbi_open doc The concurrency restriction is on threads within a single process. Multiple processes can use mdb_dbi_open without affecting each other. --- libraries/liblmdb/lmdb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h index bdbb0b909b..d692b174bf 100644 --- a/libraries/liblmdb/lmdb.h +++ b/libraries/liblmdb/lmdb.h @@ -1025,9 +1025,9 @@ int mdb_txn_renew(MDB_txn *txn); * After a successful commit the * handle will reside in the shared environment, and may be used * by other transactions. This function must not be called from - * multiple concurrent transactions. A transaction that uses this function - * must finish (either commit or abort) before any other transaction may - * use this function. + * multiple concurrent transactions in the same process. A transaction + * that uses this function must finish (either commit or abort) before + * any other transaction in the process may use this function. * * To use named databases (with name != NULL), #mdb_env_set_maxdbs() * must be called before opening the environment. Database names From f1417e2634c44fd560c2f7529bd331bd59075afd Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sat, 13 Dec 2014 20:35:08 +0100 Subject: [PATCH 2/3] make clean: remove *.lo --- libraries/liblmdb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile index 5f8ef64461..bca5cd3819 100644 --- a/libraries/liblmdb/Makefile +++ b/libraries/liblmdb/Makefile @@ -41,7 +41,7 @@ install: $(ILIBS) $(IPROGS) $(IHDRS) for f in $(IDOCS); do cp $$f $(DESTDIR)$(prefix)/man/man1; done clean: - rm -rf $(PROGS) *.[ao] *.so *~ testdb + rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb test: all rm -rf testdb && mkdir testdb From a0accc86f21bf502c2f494d4cc14cea2c78858c5 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 15 Dec 2014 20:40:59 +0000 Subject: [PATCH 3/3] Fix MDB_APPEND doc We actually compare the new key against the last key, to prevent corruption. --- libraries/liblmdb/lmdb.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h index d692b174bf..408b6ed0ea 100644 --- a/libraries/liblmdb/lmdb.h +++ b/libraries/liblmdb/lmdb.h @@ -1270,10 +1270,9 @@ int mdb_get(MDB_txn *txn, MDB_dbi dbi, MDB_val *key, MDB_val *data); * LMDB does nothing else with this memory, the caller is expected * to modify all of the space requested. *
  • #MDB_APPEND - append the given key/data pair to the end of the - * database. No key comparisons are performed. This option allows - * fast bulk loading when keys are already known to be in the - * correct order. Loading unsorted keys with this flag will cause - * data corruption. + * database. This option allows fast bulk loading when keys are + * already known to be in the correct order. Loading unsorted keys + * with this flag will cause a #MDB_KEYEXIST error. *
  • #MDB_APPENDDUP - as above, but for sorted dup data. * * @return A non-zero error value on failure and 0 on success. Some possible