--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-12-13 16:13:32 +01:00
10 changed files with 179 additions and 141 deletions
+7 -7
View File
@@ -366,7 +366,7 @@ bool Master::_StartDB()
{
sLog.SetLogDB(false);
std::string dbstring;
uint8 async_threads, connections;
uint8 async_threads, synch_threads;
dbstring = sConfig.GetStringDefault("WorldDatabaseInfo", "");
if (dbstring.empty())
@@ -383,10 +383,10 @@ bool Master::_StartDB()
return false;
}
connections = sConfig.GetIntDefault("WorldDatabase.Connections", 2);
synch_threads = sConfig.GetIntDefault("WorldDatabase.SynchThreads", 1);
///- Initialise the world database
if (!WorldDatabase.Open(dbstring, async_threads, connections))
if (!WorldDatabase.Open(dbstring, async_threads, synch_threads))
{
sLog.outError("Cannot connect to world database %s", dbstring.c_str());
return false;
@@ -407,10 +407,10 @@ bool Master::_StartDB()
return false;
}
connections = sConfig.GetIntDefault("CharacterDatabase.Connections", 2);
synch_threads = sConfig.GetIntDefault("CharacterDatabase.SynchThreads", 2);
///- Initialise the Character database
if (!CharacterDatabase.Open(dbstring, async_threads, connections))
if (!CharacterDatabase.Open(dbstring, async_threads, synch_threads))
{
sLog.outError("Cannot connect to Character database %s", dbstring.c_str());
return false;
@@ -432,10 +432,10 @@ bool Master::_StartDB()
return false;
}
connections = sConfig.GetIntDefault("LoginDatabase.Connections", 2);
synch_threads = sConfig.GetIntDefault("LoginDatabase.SynchThreads", 1);
///- Initialise the login database
if (!LoginDatabase.Open(dbstring, async_threads, connections))
if (!LoginDatabase.Open(dbstring, async_threads, synch_threads))
{
sLog.outError("Cannot connect to login database %s", dbstring.c_str());
return false;
+11 -10
View File
@@ -94,7 +94,8 @@ CharacterDatabaseInfo = "127.0.0.1;3306;trinity;trinity;characters"
# WorldDatabase.WorkerThreads
# CharacterDatabase.WorkerThreads
# Description: The amount of worker threads spawned to handle asynchronous (delayed) MySQL
# statements.
# statements. Each worker thread is mirrored with its own connection to the
# MySQL server and their own thread on the MySQL server.
# Default: 1 - (LoginDatabase.WorkerThreads)
# 1 - (WorldDatabase.WorkerThreads)
# 1 - (CharacterDatabase.WorkerThreads)
@@ -104,17 +105,17 @@ WorldDatabase.WorkerThreads = 1
CharacterDatabase.WorkerThreads = 1
#
# LoginDatabase.Connections
# WorldDatabase.Connections
# CharacterDatabase.Connections
# Description: The amount of MySQL connections spawned.
# Default: 1 - (LoginDatabase.Connections)
# 1 - (WorldDatabase.Connections)
# LoginDatabase.SynchThreads
# WorldDatabase.SynchThreads
# CharacterDatabase.SynchThreads
# Description: The amount of MySQL connections spawned to handle.
# Default: 1 - (LoginDatabase.WorkerThreads)
# 1 - (WorldDatabase.WorkerThreads)
# 2 - (CharacterDatabase.WorkerThreads)
LoginDatabase.Connections = 2
WorldDatabase.Connections = 2
CharacterDatabase.Connections = 2
LoginDatabase.SynchThreads = 1
WorldDatabase.SynchThreads = 1
CharacterDatabase.SynchThreads = 2
#
# MaxPingTime