summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src/dbintf.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-01-12 23:00:18 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-01-12 23:00:18 +0000
commit88722c0734ae6ce9b91ba397b89c4b73ed6f064d (patch)
treef7015fc820d7ec94dcea7f9e4511edcb9d6bce69 /plugins/Dbx_mdb/src/dbintf.cpp
parent3f5208b9147b32ddcf259ec8bb3fb280192928f8 (diff)
transaction locker
very first version of settings writer/reader git-svn-id: http://svn.miranda-ng.org/main/trunk@11847 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mdb/src/dbintf.cpp')
-rw-r--r--plugins/Dbx_mdb/src/dbintf.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp
index f646273100..52e5083e75 100644
--- a/plugins/Dbx_mdb/src/dbintf.cpp
+++ b/plugins/Dbx_mdb/src/dbintf.cpp
@@ -51,6 +51,7 @@ CDbxMdb::CDbxMdb(const TCHAR *tszFileName, int iMode) :
InitDbInstance(this);
mdb_env_create(&m_pMdbEnv);
+ mdb_env_set_mapsize(m_pMdbEnv, 65536);
mdb_env_set_maxdbs(m_pMdbEnv, 10);
m_codePage = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
@@ -95,6 +96,13 @@ int CDbxMdb::Load(bool bSkipInit)
return EGROKPRF_CANTREAD;
if (!bSkipInit) {
+ txn_lock trnlck(m_pMdbEnv);
+ mdb_open(trnlck, "contacts", MDB_CREATE | MDB_INTEGERKEY, &m_dbContacts);
+ mdb_open(trnlck, "modules", MDB_CREATE | MDB_INTEGERKEY, &m_dbModules);
+ mdb_open(trnlck, "events", MDB_CREATE | MDB_INTEGERKEY, &m_dbEvents);
+ mdb_open(trnlck, "settings", MDB_CREATE, &m_dbSettings);
+ trnlck.commit();
+
if (InitModuleNames()) return EGROKPRF_CANTREAD;
if (InitCrypt()) return EGROKPRF_CANTREAD;