mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
WL#2936
Move copying of global variables into thd.variables into plugin_thdvar_init(). plugin_thdvar_init() may be called multiple times when THD::change_user() is called. This fixes a plugin ref-count leak when running the test mysql_client_test
This commit is contained in:
parent
a57260dbfb
commit
0f0ef2fe14
@@ -345,6 +345,7 @@ THD::THD()
|
||||
time_after_lock=(time_t) 0;
|
||||
current_linfo = 0;
|
||||
slave_thread = 0;
|
||||
bzero(&variables, sizeof(variables));
|
||||
thread_id= variables.pseudo_thread_id= 0;
|
||||
one_shot_set= 0;
|
||||
file_id = 0;
|
||||
@@ -455,8 +456,6 @@ void THD::pop_internal_handler()
|
||||
void THD::init(void)
|
||||
{
|
||||
pthread_mutex_lock(&LOCK_global_system_variables);
|
||||
variables= global_system_variables;
|
||||
variables.table_plugin= NULL;
|
||||
plugin_thdvar_init(this);
|
||||
variables.time_format= date_time_format_copy((THD*) 0,
|
||||
variables.time_format);
|
||||
|
||||
Reference in New Issue
Block a user