From f5d6319d4ddd35a9be9ea886aa119465360e397e Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Sat, 4 Dec 2010 21:50:36 +0100 Subject: Core/DBLayer: - Make the mysql connectionpool shared for async and syncrhonous connections. - Allow configurable amount of connections for the pool - Allow configurable amount of delaythreads Note that delaythreads now only represent in-core threads. Whenever they execute a task they will pick a free connection from the pool instead of using their previously unique assigned connection. The purpose of this design change is better distribution of SQL requests (no bottlenecks paired with idling) among available resources. This also prevents a ¨memory waste¨ of preparing async prepared statements on synchronous connections (that were never called) - and vice versa. Now, connections aren´t explicitly async or synchronous, they serve both purposes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use at own risk, might cause instabilities. Don´t forget to update your config files and clear your cmake cache. --HG-- branch : trunk --- src/server/shared/Database/MySQLConnection.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/server/shared/Database/MySQLConnection.cpp') diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index 20c614b5333..de05ee311db 100755 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -34,20 +34,11 @@ MySQLConnection::MySQLConnection(MySQLConnectionInfo& connInfo) : m_queue(NULL), -m_worker(NULL), m_Mysql(NULL), m_connectionInfo(connInfo) { } -MySQLConnection::MySQLConnection(ACE_Activation_Queue* queue, MySQLConnectionInfo& connInfo) : -m_queue(queue), -m_Mysql(NULL), -m_connectionInfo(connInfo) -{ - m_worker = new DatabaseWorker(m_queue, this); -} - MySQLConnection::~MySQLConnection() { ASSERT (m_Mysql); /// MySQL context must be present at this point -- cgit v1.2.3