35 _open.push([
this, name, updatesEnabledForThis, &pool]() ->
bool
37 std::string
const dbString =
sConfigMgr->GetStringDefault(name +
"DatabaseInfo",
"");
45 if (asyncThreads < 1 || asyncThreads > 32)
48 "Please pick a value between 1 and 32.", name.c_str());
58 if ((error == ER_BAD_DB_ERROR) && updatesEnabledForThis &&
_autoSetup)
68 TC_LOG_ERROR(
"sql.driver",
"\nDatabasePool %s NOT opened. There were errors opening the MySQL connections. Check your SQLDriverLogFile "
69 "for specific errors. Read wiki at http://www.trinitycore.info/display/tc/TrinityCore+Home", name.c_str());
83 if (updatesEnabledForThis)
85 _populate.push([
this, name, &pool]() ->
bool
89 TC_LOG_ERROR(
_logger,
"Could not populate the %s database, see log for details.", name.c_str());
95 _update.push([
this, name, &pool]() ->
bool
99 TC_LOG_ERROR(
_logger,
"Could not update the %s database, see log for details.", name.c_str());
106 _prepare.push([
this, name, &pool]() ->
bool
110 TC_LOG_ERROR(
_logger,
"Could not prepare statements of the %s database, see log for details.", name.c_str());
std::queue< Predicate > _update
Definition: DatabaseLoader.h:71
bool const _autoSetup
Definition: DatabaseLoader.h:68
std::queue< Predicate > _prepare
Definition: DatabaseLoader.h:71
void SetConnectionInfo(std::string const &infoString, uint8 const asyncThreads, uint8 const synchThreads)
Definition: DatabaseWorkerPool.cpp:36
#define sConfigMgr
Definition: Config.h:61
uint32 const _updateFlags
Definition: DatabaseLoader.h:69
void Close()
Definition: DatabaseWorkerPool.cpp:72
bool PrepareStatements()
Prepares all prepared statements.
Definition: DatabaseWorkerPool.cpp:93
uint32_t uint32
Definition: Define.h:150
std::queue< Predicate > _populate
Definition: DatabaseLoader.h:71
std::stack< Closer > _close
Definition: DatabaseLoader.h:72
uint8_t uint8
Definition: g3dmath.h:164
Definition: DBUpdater.h:69
uint8_t uint8
Definition: Define.h:152
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
std::queue< Predicate > _open
Definition: DatabaseLoader.h:71
std::string const _logger
Definition: DatabaseLoader.h:67
static bool IsEnabled(uint32 const updateMask)
uint32 Open()
Definition: DatabaseWorkerPool.cpp:46