aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-02-18 11:15:04 +0200
committerRiccardo Spagni <ric@spagni.net>2019-02-18 11:15:05 +0200
commita8e752d383bb7f7dd71f704b6c209d6f4e0a2331 (patch)
treeced01d0d3ffda1fa0400abe789ab6d36a68854e0 /src
parentMerge pull request #5153 (diff)
parentdb_lmdb: fix missing mdb_dbi_close in migration (diff)
downloadmonero-a8e752d383bb7f7dd71f704b6c209d6f4e0a2331.tar.xz
Merge pull request #5155
2c0fc8b4 db_lmdb: fix missing mdb_dbi_close in migration (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index 963f55790..37907175f 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -4355,6 +4355,7 @@ void BlockchainLMDB::migrate_2_3()
throw0(DB_ERROR(lmdb_error("Failed to delete old block_info table: ", result).c_str()));
RENAME_DB("block_infn");
+ mdb_dbi_close(m_env, m_block_info);
lmdb_db_open(txn, "block_info", MDB_INTEGERKEY | MDB_CREATE | MDB_DUPSORT | MDB_DUPFIXED, m_block_info, "Failed to open db handle for block_infn");
mdb_set_dupsort(txn, m_block_info, compare_uint64);
@@ -4514,6 +4515,7 @@ void BlockchainLMDB::migrate_3_4()
throw0(DB_ERROR(lmdb_error("Failed to delete old block_info table: ", result).c_str()));
RENAME_DB("block_infn");
+ mdb_dbi_close(m_env, m_block_info);
lmdb_db_open(txn, "block_info", MDB_INTEGERKEY | MDB_CREATE | MDB_DUPSORT | MDB_DUPFIXED, m_block_info, "Failed to open db handle for block_infn");
mdb_set_dupsort(txn, m_block_info, compare_uint64);