From f54af02b45a1a6f3bd4a7b8fce9525434cd5beb9 Mon Sep 17 00:00:00 2001 From: Benau Date: Fri, 10 May 2019 16:16:09 +0800 Subject: [PATCH] Use sqlite3_open_v2 with SQLITE_OPEN_SHAREDCACHE --- src/network/protocols/server_lobby.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/network/protocols/server_lobby.cpp b/src/network/protocols/server_lobby.cpp index 467a6fcb1..269161e03 100644 --- a/src/network/protocols/server_lobby.cpp +++ b/src/network/protocols/server_lobby.cpp @@ -177,7 +177,9 @@ void ServerLobby::initDatabase() m_ip_geolocation_table_exists = false; if (!ServerConfig::m_sql_management) return; - int ret = sqlite3_open(ServerConfig::m_database_file.c_str(), &m_db); + int ret = sqlite3_open_v2(ServerConfig::m_database_file.c_str(), &m_db, + SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_FULLMUTEX | + SQLITE_OPEN_READWRITE, NULL); if (ret != SQLITE_OK) { Log::error("ServerLobby", "Cannot open database: %s.",