mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[11054] Do not allow async transaction execution while server is loading. Call Database::InitDelayThread() function explicitly to create async DB worker thread after server initialization is complete.
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
e6e7bf8573
commit
07c9f0cbb8
9 changed files with 59 additions and 58 deletions
|
|
@ -56,23 +56,7 @@ DatabaseMysql::DatabaseMysql()
|
|||
|
||||
DatabaseMysql::~DatabaseMysql()
|
||||
{
|
||||
if (m_delayThread)
|
||||
HaltDelayThread();
|
||||
|
||||
//destroy SqlConnection objects
|
||||
if(m_pQueryConnections.size())
|
||||
{
|
||||
for (int i = 0; i < m_pQueryConnections.size(); ++i)
|
||||
delete m_pQueryConnections[i];
|
||||
|
||||
m_pQueryConnections.clear();
|
||||
}
|
||||
|
||||
if(m_pAsyncConn)
|
||||
{
|
||||
delete m_pAsyncConn;
|
||||
m_pAsyncConn = NULL;
|
||||
}
|
||||
StopServer();
|
||||
|
||||
//Free Mysql library pointers for last ~DB
|
||||
if(--db_count == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue