mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[11059] Fix crash in [11054]. As it turned out - we use not only async transactions but async queries too during server startup =/
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
24164ef020
commit
d67219e327
5 changed files with 17 additions and 10 deletions
|
|
@ -75,6 +75,8 @@ bool Database::Initialize(const char * infoString, int nConns /*= 1*/)
|
|||
return false;
|
||||
|
||||
m_pResultQueue = new SqlResultQueue;
|
||||
|
||||
InitDelayThread();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -277,7 +279,7 @@ bool Database::Execute(const char *sql)
|
|||
else
|
||||
{
|
||||
//if async execution is not available
|
||||
if(!m_threadBody)
|
||||
if(!m_bAllowAsyncTransactions)
|
||||
return DirectExecute(sql);
|
||||
|
||||
// Simple sql statement
|
||||
|
|
@ -363,7 +365,7 @@ bool Database::CommitTransaction()
|
|||
return false;
|
||||
|
||||
//if async execution is not available
|
||||
if(!m_delayThread)
|
||||
if(!m_bAllowAsyncTransactions)
|
||||
return CommitTransactionDirect();
|
||||
|
||||
//add SqlTransaction to the async queue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue