aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/BattleGround.cpp2
-rw-r--r--src/shared/Database/DatabaseMysql.cpp14
2 files changed, 15 insertions, 1 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index afbc5de607a..2f02aa0de8f 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -728,7 +728,7 @@ void BattleGround::EndBattleGround(uint32 winner)
RewardMark(plr,ITEM_WINNER_COUNT);
RewardQuest(plr);
}
- else
+ else if(winner !=0)
{
RewardMark(plr,ITEM_LOSER_COUNT);
}
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