mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16: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
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue