mirror of
https://github.com/MariaDB/server.git
synced 2025-07-18 23:03:28 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@ -600,7 +600,7 @@ extern "C" void thd_kill_timeout(THD* thd)
|
||||
thd->awake(KILL_TIMEOUT);
|
||||
}
|
||||
|
||||
THD::THD(my_thread_id id, bool is_wsrep_applier, bool skip_global_sys_var_lock)
|
||||
THD::THD(my_thread_id id, bool is_wsrep_applier)
|
||||
:Statement(&main_lex, &main_mem_root, STMT_CONVENTIONAL_EXECUTION,
|
||||
/* statement id */ 0),
|
||||
rli_fake(0), rgi_fake(0), rgi_slave(NULL),
|
||||
@ -808,7 +808,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier, bool skip_global_sys_var_lock)
|
||||
/* Call to init() below requires fully initialized Open_tables_state. */
|
||||
reset_open_tables_state(this);
|
||||
|
||||
init(skip_global_sys_var_lock);
|
||||
init();
|
||||
#if defined(ENABLED_PROFILING)
|
||||
profiling.set_thd(this);
|
||||
#endif
|
||||
@ -1216,11 +1216,10 @@ const Type_handler *THD::type_handler_for_date() const
|
||||
Init common variables that has to be reset on start and on change_user
|
||||
*/
|
||||
|
||||
void THD::init(bool skip_lock)
|
||||
void THD::init()
|
||||
{
|
||||
DBUG_ENTER("thd::init");
|
||||
if (!skip_lock)
|
||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||
plugin_thdvar_init(this);
|
||||
/*
|
||||
plugin_thd_var_init() sets variables= global_system_variables, which
|
||||
@ -1233,8 +1232,7 @@ void THD::init(bool skip_lock)
|
||||
::strmake(default_master_connection_buff,
|
||||
global_system_variables.default_master_connection.str,
|
||||
variables.default_master_connection.length);
|
||||
if (!skip_lock)
|
||||
mysql_mutex_unlock(&LOCK_global_system_variables);
|
||||
mysql_mutex_unlock(&LOCK_global_system_variables);
|
||||
|
||||
user_time.val= start_time= start_time_sec_part= 0;
|
||||
|
||||
@ -1723,7 +1721,7 @@ THD::~THD()
|
||||
|
||||
/* trick to make happy memory accounting system */
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
session_tracker.deinit();
|
||||
session_tracker.sysvars.deinit();
|
||||
#endif //EMBEDDED_LIBRARY
|
||||
|
||||
if (status_var.local_memory_used != 0)
|
||||
@ -7151,12 +7149,12 @@ void THD::set_last_commit_gtid(rpl_gtid >id)
|
||||
#endif
|
||||
m_last_commit_gtid= gtid;
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
if (changed_gtid &&
|
||||
session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)->is_enabled())
|
||||
if (changed_gtid && session_tracker.sysvars.is_enabled())
|
||||
{
|
||||
session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)->
|
||||
DBUG_ASSERT(current_thd == this);
|
||||
session_tracker.sysvars.
|
||||
mark_as_changed(this, (LEX_CSTRING*)Sys_last_gtid_ptr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user