From 3a51ef7f070200c6bb1c223fad34b2a9f1fde8be Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 28 Feb 2011 13:54:00 +0100 Subject: [PATCH] Fixed: #868 0:Invalid account (2101) error caused by Shard Unifier Service and MySQL (patch provided by kerozcak) --- code/ryzom/server/src/server_share/mysql_wrapper.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/ryzom/server/src/server_share/mysql_wrapper.cpp b/code/ryzom/server/src/server_share/mysql_wrapper.cpp index 1be4c0e96..bca89f284 100644 --- a/code/ryzom/server/src/server_share/mysql_wrapper.cpp +++ b/code/ryzom/server/src/server_share/mysql_wrapper.cpp @@ -25,6 +25,7 @@ using namespace NLNET; CVariable MSWStrictMode("msw", "MSWStrictMode", "Set the strict mode on SQL request", true, 0, true); CVariable MSWRequestDuration("msw", "MSWRequestDuration", "Measure the duration of SQL request", 0, 1000); +CVariable MSWAutoReconnect("msw", "MSWAutoReconnect", "MYSQL_OPT_RECONNECT", true, 0, true); namespace MSW @@ -112,6 +113,11 @@ namespace MSW nlassert(!_Connected); + if (MSWAutoReconnect) + { + addOption(MYSQL_OPT_RECONNECT, "1"); + } + return _connect(); }