From fcec787e9cfa5b461f2dd060496c678ffa800965 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Wed, 29 Sep 2010 15:29:57 +0200 Subject: Core/DBLayer: Pass connection info down to lower level class MySQLConnection and use relevant data in logging messages in its methods --HG-- branch : trunk --- src/server/shared/Database/MySQLConnection.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/server/shared/Database/MySQLConnection.h') diff --git a/src/server/shared/Database/MySQLConnection.h b/src/server/shared/Database/MySQLConnection.h index cfef240fda2..34287948aed 100644 --- a/src/server/shared/Database/MySQLConnection.h +++ b/src/server/shared/Database/MySQLConnection.h @@ -66,11 +66,11 @@ class MySQLConnection friend class PingOperation; public: - MySQLConnection(); //! Constructor for synchroneous connections. - MySQLConnection(ACE_Activation_Queue* queue); //! Constructor for asynchroneous connections. + MySQLConnection(const MySQLConnectionInfo& connInfo); //! Constructor for synchroneous connections. + MySQLConnection(ACE_Activation_Queue* queue, const MySQLConnectionInfo& connInfo); //! Constructor for asynchroneous connections. ~MySQLConnection(); - virtual bool Open(const MySQLConnectionInfo& connInfo); //! Connection details. + virtual bool Open(); void Close(); public: @@ -111,6 +111,7 @@ class MySQLConnection ACE_Activation_Queue* m_queue; //! Queue shared with other asynchroneous connections. DatabaseWorker* m_worker; //! Core worker task. MYSQL * m_Mysql; //! MySQL Handle. + const MySQLConnectionInfo& m_connectionInfo; //! Connection info (used for logging) ACE_Thread_Mutex m_Mutex; }; -- cgit v1.2.3