diff options
Diffstat (limited to 'src/server/shared/Database/MySQLConnection.h')
-rwxr-xr-x | src/server/shared/Database/MySQLConnection.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h index 847e3a84633..11e94c7844e 100755 --- a/src/server/shared/Database/MySQLConnection.h +++ b/src/server/shared/Database/MySQLConnection.h @@ -16,6 +16,7 @@ */ #include <ace/Activation_Queue.h> + #include "DatabaseWorkerPool.h" #include "Util.h" @@ -88,11 +89,6 @@ class MySQLConnection void Ping() { mysql_ping(m_Mysql); } protected: - MYSQL* GetHandle() { return m_Mysql; } - MySQLPreparedStatement* GetPreparedStatement(uint32 index); - void PrepareStatement(uint32 index, const char* sql, bool async = false); - std::vector<MySQLPreparedStatement*> m_stmts; //! PreparedStatements storage - bool LockIfReady() { /// Tries to acquire lock. If lock is acquired by another thread @@ -106,6 +102,17 @@ class MySQLConnection m_Mutex.release(); } + MYSQL* GetHandle() { return m_Mysql; } + MySQLPreparedStatement* GetPreparedStatement(uint32 index); + void PrepareStatement(uint32 index, const char* sql, bool async = false); + + protected: + std::vector<MySQLPreparedStatement*> m_stmts; //! PreparedStatements storage + bool m_reconnecting; //! Are we reconnecting? + + private: + bool _HandleMySQLErrno(uint32 errNo); + private: ACE_Activation_Queue* m_queue; //! Queue shared with other asynchroneous connections. DatabaseWorker* m_worker; //! Core worker task. |