From da2fe3cbbc829c799dbb78424cd0168518024e02 Mon Sep 17 00:00:00 2001 From: def Date: Sun, 6 Jan 2019 10:59:29 +0100 Subject: [PATCH] Revert "More SQL fixes" This reverts commit a58ade137d89b1a2870c94b6e4e4d9990a18a975. --- src/engine/server/sql_server.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/engine/server/sql_server.cpp b/src/engine/server/sql_server.cpp index fb24925f3..da59dfb57 100644 --- a/src/engine/server/sql_server.cpp +++ b/src/engine/server/sql_server.cpp @@ -36,15 +36,7 @@ CSqlServer::~CSqlServer() try { if (m_pResults) - { delete m_pResults; - m_pResults = 0; - } - if (m_pStatement) - { - delete m_pStatement; - m_pStatement = 0; - } if (m_pConnection) { delete m_pConnection; @@ -128,7 +120,7 @@ bool CSqlServer::Connect() } m_pConnection = m_pDriver->connect(connection_properties); - // Create statement + // Create Statement m_pStatement = m_pConnection->createStatement(); if (m_SetUpDB) @@ -208,20 +200,16 @@ void CSqlServer::CreateTables() void CSqlServer::executeSql(const char *pCommand) { - scope_lock LockScope(&m_SqlLock); m_pStatement->execute(pCommand); } void CSqlServer::executeSqlQuery(const char *pQuery) { - scope_lock LockScope(&m_SqlLock); if (m_pResults) - { delete m_pResults; - // set it to 0, so exceptions raised from executeQuery can not make m_pResults point to invalid memory - m_pResults = 0; - } + // set it to 0, so exceptions raised from executeQuery can not make m_pResults point to invalid memory + m_pResults = 0; m_pResults = m_pStatement->executeQuery(pQuery); }