Core/DBLayer: Pass connection info down to lower level class MySQLConnection and use relevant data in logging messages in its methods

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-09-29 15:29:57 +02:00
parent d3b30e979a
commit fcec787e9c
9 changed files with 58 additions and 49 deletions

View File

@@ -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;
};