From f831f27d0884c811d40454e4be52e09a09cb1cfe Mon Sep 17 00:00:00 2001 From: def Date: Thu, 28 Feb 2019 06:14:20 +0100 Subject: [PATCH] Revert "New SQL locking on each query (fixes #1430)" This reverts commit 5ddcf8bd0ced31ad22b6cc6c3c9a14b6927f0d3b. --- src/engine/server/sql_server.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/server/sql_server.cpp b/src/engine/server/sql_server.cpp index 49c1439c3..fb24925f3 100644 --- a/src/engine/server/sql_server.cpp +++ b/src/engine/server/sql_server.cpp @@ -72,7 +72,7 @@ CSqlServer::~CSqlServer() bool CSqlServer::Connect() { - scope_lock LockScope(&m_SqlLock); + m_SqlLock.take(); if (m_pDriver != NULL && m_pConnection != NULL) { @@ -99,6 +99,7 @@ bool CSqlServer::Connect() dbg_msg("sql", "Unknown Error cause by the MySQL/C++ Connector"); } + m_SqlLock.release(); dbg_msg("sql", "ERROR: SQL connection failed"); return false; } @@ -161,11 +162,13 @@ bool CSqlServer::Connect() } dbg_msg("sql", "ERROR: sql connection failed"); + m_SqlLock.release(); return false; } void CSqlServer::Disconnect() { + m_SqlLock.release(); } void CSqlServer::CreateTables()