Skip to content

Commit

Permalink
Fix "Only allow one transaction at the same time" (#2834)
Browse files Browse the repository at this point in the history
This reverts and fixes commit 5a5c7d1.
  • Loading branch information
0blu authored Nov 17, 2024
1 parent 05057dd commit bd99c9a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/shared/Database/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,8 @@ bool Database::BeginTransaction(uint32 serialId)
{
if (!m_pAsyncConn)
return false;
//ASSERT(!m_TransStorage->get());
if (m_TransStorage->get())
return false;

MANGOS_ASSERT(!m_TransStorage->get()); // if we will get a nested transaction request - we MUST fix code!!!

//initiate transaction on current thread
m_TransStorage->init(serialId);
Expand All @@ -487,7 +486,9 @@ bool Database::CommitTransaction()
return false;

//check if we have pending transaction
ASSERT(m_TransStorage->get()); // if we will get a nested transaction request - we MUST fix code!!!
//ASSERT(m_TransStorage->get());
if (!m_TransStorage->get())
return false;

//if async execution is not available
if(!m_bAllowAsyncTransactions)
Expand Down

0 comments on commit bd99c9a

Please sign in to comment.