diff options
-rw-r--r-- | common/storage_lmdb.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp index 5fb1d0f..68157c9 100644 --- a/common/storage_lmdb.cpp +++ b/common/storage_lmdb.cpp | |||
@@ -44,12 +44,14 @@ namespace Storage { | |||
44 | 44 | ||
45 | extern QReadWriteLock sDbisLock; | 45 | extern QReadWriteLock sDbisLock; |
46 | extern QReadWriteLock sEnvironmentsLock; | 46 | extern QReadWriteLock sEnvironmentsLock; |
47 | extern QMutex sCreateDbiLock; | ||
47 | extern QHash<QString, MDB_env *> sEnvironments; | 48 | extern QHash<QString, MDB_env *> sEnvironments; |
48 | extern QHash<QString, MDB_dbi> sDbis; | 49 | extern QHash<QString, MDB_dbi> sDbis; |
49 | 50 | ||
50 | 51 | ||
51 | QReadWriteLock sDbisLock; | 52 | QReadWriteLock sDbisLock; |
52 | QReadWriteLock sEnvironmentsLock; | 53 | QReadWriteLock sEnvironmentsLock; |
54 | QMutex sCreateDbiLock; | ||
53 | QHash<QString, MDB_env *> sEnvironments; | 55 | QHash<QString, MDB_env *> sEnvironments; |
54 | QHash<QString, MDB_dbi> sDbis; | 56 | QHash<QString, MDB_dbi> sDbis; |
55 | 57 | ||
@@ -106,9 +108,6 @@ static QList<QByteArray> getDatabaseNames(MDB_txn *transaction) | |||
106 | * and we always need to commit the transaction ASAP | 108 | * and we always need to commit the transaction ASAP |
107 | * We can only ever enter from one point per process. | 109 | * We can only ever enter from one point per process. |
108 | */ | 110 | */ |
109 | |||
110 | QMutex sCreateDbiLock; | ||
111 | |||
112 | static bool createDbi(MDB_txn *transaction, const QByteArray &db, bool readOnly, bool allowDuplicates, MDB_dbi &dbi) | 111 | static bool createDbi(MDB_txn *transaction, const QByteArray &db, bool readOnly, bool allowDuplicates, MDB_dbi &dbi) |
113 | { | 112 | { |
114 | 113 | ||