You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +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'),
|
delimiter('\7'),
|
||||||
affectedRows(0)
|
affectedRows(0)
|
||||||
{
|
{
|
||||||
|
auto* cf = config::Config::makeConfig();
|
||||||
|
if (checkQueryStats(cf))
|
||||||
|
traceFlags |= execplan::CalpontSelectExecutionPlan::TRACE_LOG;
|
||||||
// check if this is a slave mysql daemon
|
// 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");
|
std::string configVal = cf->getConfig("Installation", "MySQLRep");
|
||||||
bool isMysqlRep = (configVal == "y" || configVal == "Y");
|
bool isMysqlRep = (configVal == "y" || configVal == "Y");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user