aboutsummaryrefslogtreecommitdiff
path: root/src/server/database/Database/MySQLConnection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/database/Database/MySQLConnection.h')
-rw-r--r--src/server/database/Database/MySQLConnection.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/database/Database/MySQLConnection.h b/src/server/database/Database/MySQLConnection.h
index 93681834225..b6656d42d91 100644
--- a/src/server/database/Database/MySQLConnection.h
+++ b/src/server/database/Database/MySQLConnection.h
@@ -57,11 +57,10 @@ class TC_DATABASE_API MySQLConnection
friend class PingOperation;
public:
- MySQLConnection(MySQLConnectionInfo& connInfo); //!< Constructor for synchronous connections.
- MySQLConnection(ProducerConsumerQueue<SQLOperation*>* queue, MySQLConnectionInfo& connInfo); //!< Constructor for asynchronous connections.
+ MySQLConnection(MySQLConnectionInfo& connInfo, ConnectionFlags connectionFlags);
virtual ~MySQLConnection();
- virtual uint32 Open();
+ uint32 Open();
void Close();
bool PrepareStatements();
@@ -82,6 +81,8 @@ class TC_DATABASE_API MySQLConnection
uint32 GetLastError();
+ void StartDatabaseWorkerThread(ProducerConsumerQueue<SQLOperation*>* queue);
+
protected:
/// Tries to acquire lock. If lock is acquired by another thread
/// the calling parent will just try another connection
@@ -105,7 +106,6 @@ class TC_DATABASE_API MySQLConnection
private:
bool _HandleMySQLErrno(uint32 errNo, uint8 attempts = 5);
- ProducerConsumerQueue<SQLOperation*>* m_queue; //!< Queue shared with other asynchronous connections.
std::unique_ptr<DatabaseWorker> m_worker; //!< Core worker task.
MySQLHandle* m_Mysql; //!< MySQL Handle.
MySQLConnectionInfo& m_connectionInfo; //!< Connection info (used for logging)