diff options
author | Machiavelli <none@none> | 2010-12-19 16:13:45 +0100 |
---|---|---|
committer | Machiavelli <none@none> | 2010-12-19 16:13:45 +0100 |
commit | dfd82c2faddd00384000d96590fad07957ea6b31 (patch) | |
tree | f24e480912ce3d6db8f59e63508df9cd053f2277 /src/server/shared/Database/MySQLConnection.cpp | |
parent | e2a8dfffbec626186f6b93894aec1353774ed99b (diff) |
Core/DBLayer: Use mysql_set_character_set in MySQLConnection::Open instead of explicit string queries
Also possibly fix an absolutely useless warning on GCC
--HG--
branch : trunk
Diffstat (limited to 'src/server/shared/Database/MySQLConnection.cpp')
-rwxr-xr-x | src/server/shared/Database/MySQLConnection.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index b41cab510ed..de61153b125 100755 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -36,18 +36,18 @@ MySQLConnection::MySQLConnection(MySQLConnectionInfo& connInfo) : m_queue(NULL), m_worker(NULL), m_Mysql(NULL), +m_reconnecting(false), m_connectionInfo(connInfo), -m_connectionFlags(CONNECTION_SYNCH), -m_reconnecting(false) +m_connectionFlags(CONNECTION_SYNCH) { } MySQLConnection::MySQLConnection(ACE_Activation_Queue* queue, MySQLConnectionInfo& connInfo) : m_queue(queue), m_Mysql(NULL), +m_reconnecting(false), m_connectionInfo(connInfo), -m_connectionFlags(CONNECTION_ASYNC), -m_reconnecting(false) +m_connectionFlags(CONNECTION_ASYNC) { m_worker = new DatabaseWorker(m_queue, this); } @@ -131,8 +131,7 @@ bool MySQLConnection::Open() // set connection properties to UTF8 to properly handle locales for different // server configs - core sends data in UTF8, so MySQL must expect UTF8 too - Execute("SET NAMES `utf8`"); - Execute("SET CHARACTER SET `utf8`"); + mysql_set_character_set(m_Mysql, "utf8"); return true; } else |