mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[11061] Bring 'autocommit' mode for MySQL back. This MySQL feature operates in so frustrating way so it is better to keep it ALWAYS ENABLED!!!
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
f7a45e9e9a
commit
fce48282ad
3 changed files with 7 additions and 10 deletions
|
|
@ -283,10 +283,7 @@ bool Database::Execute(const char *sql)
|
|||
return DirectExecute(sql);
|
||||
|
||||
// Simple sql statement
|
||||
pTrans = new SqlTransaction;
|
||||
pTrans->DelayExecute(sql);
|
||||
|
||||
m_threadBody->Delay(pTrans);
|
||||
m_threadBody->Delay(new SqlStatement(sql));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -152,12 +152,12 @@ bool MySQLConnection::Initialize(const char *infoString)
|
|||
// autocommit is turned of during it.
|
||||
// Setting it to on makes atomic updates work
|
||||
// ---
|
||||
// if you want atomic updates to work - USE TRANSACTIONS!!!
|
||||
// no need to mess up with autocommit mode which might degrade server performance!
|
||||
if (!mysql_autocommit(mMysql, 0))
|
||||
DETAIL_LOG("AUTOCOMMIT SUCCESSFULLY SET TO 0");
|
||||
// LEAVE 'AUTOCOMMIT' MODE ALWAYS ENABLED!!!
|
||||
// W/O IT EVEN 'SELECT' QUERIES WOULD REQUIRE TO BE WRAPPED INTO 'START TRANSACTION'<>'COMMIT' CLAUSES!!!
|
||||
if (!mysql_autocommit(mMysql, 1))
|
||||
DETAIL_LOG("AUTOCOMMIT SUCCESSFULLY SET TO 1");
|
||||
else
|
||||
DETAIL_LOG("AUTOCOMMIT NOT SET TO 0");
|
||||
DETAIL_LOG("AUTOCOMMIT NOT SET TO 1");
|
||||
/*-------------------------------------*/
|
||||
|
||||
// set connection properties to UTF8 to properly handle locales for different
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11060"
|
||||
#define REVISION_NR "11061"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue