1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-05 16:15:50 +03:00

feat(plugin): fixup for side effects

This commit is contained in:
drrtuy
2025-05-05 19:10:47 +00:00
parent 7b02299f50
commit 11e5e481ab

View File

@@ -4127,33 +4127,33 @@ int ha_mcs_impl_pushdown_init(mcs_handler_info* handler_info, TABLE* table, bool
bool localQuery = (get_local_query(thd) > 0 ? true : false); bool localQuery = (get_local_query(thd) > 0 ? true : false);
{ {
ci->stats.reset(); // reset query stats // ci->stats.reset(); // reset query stats
ci->stats.setStartTime(); // ci->stats.setStartTime();
if (thd->main_security_ctx.user) // if (thd->main_security_ctx.user)
{ // {
ci->stats.fUser = thd->main_security_ctx.user; // ci->stats.fUser = thd->main_security_ctx.user;
} // }
else // else
{ // {
ci->stats.fUser = ""; // ci->stats.fUser = "";
} // }
if (thd->main_security_ctx.host) // if (thd->main_security_ctx.host)
ci->stats.fHost = thd->main_security_ctx.host; // ci->stats.fHost = thd->main_security_ctx.host;
else if (thd->main_security_ctx.host_or_ip) // else if (thd->main_security_ctx.host_or_ip)
ci->stats.fHost = thd->main_security_ctx.host_or_ip; // ci->stats.fHost = thd->main_security_ctx.host_or_ip;
else // else
ci->stats.fHost = "unknown"; // ci->stats.fHost = "unknown";
try // try
{ // {
ci->stats.userPriority(ci->stats.fHost, ci->stats.fUser); // ci->stats.userPriority(ci->stats.fHost, ci->stats.fUser);
} // }
catch (std::exception& e) // catch (std::exception& e)
{ // {
string msg = string("Columnstore User Priority - ") + e.what(); // string msg = string("Columnstore User Priority - ") + e.what();
ci->warningMsg = msg; // ci->warningMsg = msg;
} // }
// if the previous query has error, re-establish the connection // if the previous query has error, re-establish the connection
if (ci->queryState != 0) if (ci->queryState != 0)