1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

cleanup: THD::change_user

This commit is contained in:
Sergei Golubchik
2025-02-21 20:55:54 +01:00
parent fa47c73561
commit 02b81afff8
2 changed files with 15 additions and 28 deletions

View File

@@ -1546,6 +1546,14 @@ void THD::init_for_queries()
void THD::change_user(void)
{
#ifdef WITH_WSREP
bool pause_wsrep= wsrep_cs().state() != wsrep::client_state::s_none;
if (pause_wsrep)
{
wsrep_after_command_ignore_result(this);
wsrep_close(this);
}
#endif /* WITH_WSREP */
if (!status_in_global) // Reset in init()
add_status_to_global();
@@ -1575,6 +1583,13 @@ void THD::change_user(void)
sp_caches_clear();
statement_rcontext_reinit();
opt_trace.delete_traces();
#ifdef WITH_WSREP
if (pause_wsrep)
{
wsrep_open(this);
wsrep_before_command(this);
}
#endif /* WITH_WSREP */
}
/**