diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-23 19:51:30 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-23 19:51:30 +0300 |
commit | 80207f75648fad4294a77ff9ce50f0edaedffeca (patch) | |
tree | 84901161521d83fc1df371f0a7ab1924b61c0b6f /plugins/Dbx_mdbx/src/dbintf.cpp | |
parent | 4a54d1481e37dbac6c055e44abc32e8f72b04a15 (diff) |
dbx_mdbx:
- fix for a name conflict;
- stricter transaction scope;
- version bump
Diffstat (limited to 'plugins/Dbx_mdbx/src/dbintf.cpp')
-rw-r--r-- | plugins/Dbx_mdbx/src/dbintf.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Dbx_mdbx/src/dbintf.cpp b/plugins/Dbx_mdbx/src/dbintf.cpp index 7bdfa8b7d1..183ea4130d 100644 --- a/plugins/Dbx_mdbx/src/dbintf.cpp +++ b/plugins/Dbx_mdbx/src/dbintf.cpp @@ -101,25 +101,25 @@ int CDbxMDBX::Load(bool bSkipInit) {
MDBX_val key, val;
- mdbx_txn_begin(m_env, nullptr, MDBX_RDONLY, &m_txn);
+ mdbx_txn_begin(m_env, nullptr, MDBX_RDONLY, &m_txn_ro);
- mdbx_cursor_open(m_txn, m_dbEvents, &m_curEvents);
+ mdbx_cursor_open(m_txn_ro, m_dbEvents, &m_curEvents);
if (mdbx_cursor_get(m_curEvents, &key, &val, MDBX_LAST) == MDBX_SUCCESS)
m_dwMaxEventId = *(MEVENT*)key.iov_base;
- mdbx_cursor_open(m_txn, m_dbEventsSort, &m_curEventsSort);
- mdbx_cursor_open(m_txn, m_dbSettings, &m_curSettings);
- mdbx_cursor_open(m_txn, m_dbModules, &m_curModules);
+ mdbx_cursor_open(m_txn_ro, m_dbEventsSort, &m_curEventsSort);
+ mdbx_cursor_open(m_txn_ro, m_dbSettings, &m_curSettings);
+ mdbx_cursor_open(m_txn_ro, m_dbModules, &m_curModules);
- mdbx_cursor_open(m_txn, m_dbContacts, &m_curContacts);
+ mdbx_cursor_open(m_txn_ro, m_dbContacts, &m_curContacts);
if (mdbx_cursor_get(m_curContacts, &key, &val, MDBX_LAST) == MDBX_SUCCESS)
m_maxContactId = *(MCONTACT*)key.iov_base;
MDBX_stat st;
- mdbx_dbi_stat(m_txn, m_dbContacts, &st, sizeof(st));
+ mdbx_dbi_stat(m_txn_ro, m_dbContacts, &st, sizeof(st));
m_contactCount = st.ms_entries;
- mdbx_txn_reset(m_txn);
+ mdbx_txn_reset(m_txn_ro);
}
|