You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
[MCOL-4944] Automatically enable stats collection
if it is enabled in the config
This commit is contained in:
@ -279,13 +279,26 @@ struct cal_connection_info
|
||||
delimiter('\7'),
|
||||
affectedRows(0)
|
||||
{
|
||||
auto* cf = config::Config::makeConfig();
|
||||
if (checkQueryStats(cf))
|
||||
traceFlags |= execplan::CalpontSelectExecutionPlan::TRACE_LOG;
|
||||
// check if this is a slave mysql daemon
|
||||
isSlaveNode = checkSlave();
|
||||
isSlaveNode = checkSlave(cf);
|
||||
}
|
||||
|
||||
static bool checkSlave()
|
||||
bool checkQueryStats(config::Config* cfg)
|
||||
{
|
||||
config::Config* cf = config::Config::makeConfig();
|
||||
std::string qsVal = cfg->getConfig("QueryStats", "Enabled");
|
||||
if (qsVal == "Y" || qsVal == "Y")
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool checkSlave(config::Config* cf = nullptr)
|
||||
{
|
||||
if (!cf)
|
||||
cf = config::Config::makeConfig();
|
||||
std::string configVal = cf->getConfig("Installation", "MySQLRep");
|
||||
bool isMysqlRep = (configVal == "y" || configVal == "Y");
|
||||
|
||||
|
Reference in New Issue
Block a user