Core/DBLayer: Store MySQL connection details in a struct and print relevant data in sql driver messages

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-09-29 08:48:06 +02:00
parent dcbe4026c3
commit bf72fa749f
9 changed files with 59 additions and 52 deletions

View File

@@ -18,9 +18,9 @@
#include "CharacterDatabase.h"
bool CharacterDatabaseConnection::Open(const std::string& infoString)
bool CharacterDatabaseConnection::Open(const MySQLConnectionInfo& connInfo)
{
if (!MySQLConnection::Open(infoString))
if (!MySQLConnection::Open(connInfo))
return false;
m_stmts.resize(MAX_CHARACTERDATABASE_STATEMENTS);

View File

@@ -30,7 +30,7 @@ class CharacterDatabaseConnection : public MySQLConnection
CharacterDatabaseConnection(ACE_Activation_Queue* q) : MySQLConnection(q) {}
//- Loads databasetype specific prepared statements
bool Open(const std::string& infoString);
bool Open(const MySQLConnectionInfo& connInfo);
};
typedef DatabaseWorkerPool<CharacterDatabaseConnection> CharacterDatabaseWorkerPool;

View File

@@ -18,9 +18,9 @@
#include "LoginDatabase.h"
bool LoginDatabaseConnection::Open(const std::string& infoString)
bool LoginDatabaseConnection::Open(const MySQLConnectionInfo& connInfo)
{
if (!MySQLConnection::Open(infoString))
if (!MySQLConnection::Open(connInfo))
return false;
m_stmts.resize(MAX_LOGINDATABASE_STATEMENTS);

View File

@@ -30,7 +30,7 @@ class LoginDatabaseConnection : public MySQLConnection
LoginDatabaseConnection(ACE_Activation_Queue* q) : MySQLConnection(q) {}
//- Loads databasetype specific prepared statements
bool Open(const std::string& infoString);
bool Open(const MySQLConnectionInfo& connInfo);
};
typedef DatabaseWorkerPool<LoginDatabaseConnection> LoginDatabaseWorkerPool;

View File

@@ -18,9 +18,9 @@
#include "WorldDatabase.h"
bool WorldDatabaseConnection::Open(const std::string& infoString)
bool WorldDatabaseConnection::Open(const MySQLConnectionInfo& connInfo)
{
if (!MySQLConnection::Open(infoString))
if (!MySQLConnection::Open(connInfo))
return false;
m_stmts.resize(MAX_WORLDDATABASE_STATEMENTS);

View File

@@ -30,7 +30,7 @@ class WorldDatabaseConnection : public MySQLConnection
WorldDatabaseConnection(ACE_Activation_Queue* q) : MySQLConnection(q) {}
//- Loads databasetype specific prepared statements
bool Open(const std::string& infoString);
bool Open(const MySQLConnectionInfo& connInfo);
};
typedef DatabaseWorkerPool<WorldDatabaseConnection> WorldDatabaseWorkerPool;