diff options
author | megamage <none@none> | 2009-03-21 22:40:06 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-21 22:40:06 -0600 |
commit | ddb7265018d15660ac1a8f97b1c5162e0e161647 (patch) | |
tree | 1bbb6d38d458bfdb920b6154941c9b4b7e7464f2 /src/shared/Database/DatabaseMysql.cpp | |
parent | 61dcae44e55f11d33221073b51a6b7596875e605 (diff) | |
parent | 3531d0f2542f283909df43f280c12c281563cdc6 (diff) |
*Merge. Warning: I do not know if bg fix is still good for wlk.
--HG--
branch : trunk
Diffstat (limited to 'src/shared/Database/DatabaseMysql.cpp')
-rw-r--r-- | src/shared/Database/DatabaseMysql.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/shared/Database/DatabaseMysql.cpp b/src/shared/Database/DatabaseMysql.cpp index e7babedddfe..5dc02c0a738 100644 --- a/src/shared/Database/DatabaseMysql.cpp +++ b/src/shared/Database/DatabaseMysql.cpp @@ -167,6 +167,20 @@ bool DatabaseMysql::Initialize(const char *infoString) PExecute("SET NAMES `utf8`"); PExecute("SET CHARACTER SET `utf8`"); + #if MYSQL_VERSION_ID >= 50003 + my_bool my_true = (my_bool)1; + if (mysql_options(mMysql, MYSQL_OPT_RECONNECT, &my_true)) + { + sLog.outDetail("Failed to turn on MYSQL_OPT_RECONNECT."); + } + else + { + sLog.outDetail("Successfully turned on MYSQL_OPT_RECONNECT."); + } + #else + #warning "Your mySQL client lib version does not support reconnecting after a timeout.\nIf this causes you any trouble we advice you to upgrade your mySQL client libs to at least mySQL 5.0.13 to resolve this problem." + #endif + return true; } else |