mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
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:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user