From 9e52d29fd8d37da65cbfd6abfa5684e29958bc7c Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sat, 4 Jul 2015 13:48:06 +0200 Subject: [PATCH] lmdb: Simpler mdb_drop(). MDB_DBI_CHANGED(,MAIN_DBI) is never true. Change-Id: I0d12b9965d8251908ec41d1febc6b5c354a93a01 --- mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdb.c b/mdb.c index a6b7770c..8a2da5cc 100644 --- a/mdb.c +++ b/mdb.c @@ -9343,7 +9343,7 @@ int mdb_drop(MDB_txn *txn, MDB_dbi dbi, int del) if (F_ISSET(txn->mt_flags, MDB_TXN_RDONLY)) return EACCES; - if (dbi > MAIN_DBI && TXN_DBI_CHANGED(txn, dbi)) + if (TXN_DBI_CHANGED(txn, dbi)) return MDB_BAD_DBI; rc = mdb_cursor_open(txn, dbi, &mc);