MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / init

Method init

sql/sql_class.cc:871–894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

869*/
870
871void THD::init(void)
872{
873 plugin_thdvar_init(this, m_enable_plugins);
874 /*
875 variables= global_system_variables above has reset
876 variables.pseudo_thread_id to 0. We need to correct it here to
877 avoid temporary tables replication failure.
878 */
879 variables.pseudo_thread_id= thread_id;
880 server_status= SERVER_STATUS_AUTOCOMMIT;
881 if (variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)
882 server_status|= SERVER_STATUS_NO_BACKSLASH_ESCAPES;
883
884 update_lock_default= (variables.low_priority_updates ?
885 TL_WRITE_LOW_PRIORITY :
886 TL_WRITE);
887 tx_isolation= (enum_tx_isolation) variables.tx_isolation;
888 tx_read_only= variables.tx_read_only;
889 update_charset();
890
891 reset_stats();
892
893 clear_slow_extended();
894}
895
896// Resets stats in a THD.
897void THD::reset_stats(void)

Callers 2

THDMethod · 0.45
Slow_log_throttleMethod · 0.45

Calls 2

plugin_thdvar_initFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected