MCPcopy Create free account
hub / github.com/MariaDB/server / reset_for_reuse

Method reset_for_reuse

sql/sql_class.cc:1824–1864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1822*/
1823
1824void THD::reset_for_reuse()
1825{
1826 if (status_var.tmp_space_used)
1827 {
1828 DBUG_PRINT("error", ("tmp_space_usage: %lld", status_var.tmp_space_used));
1829 DBUG_ASSERT(status_var.tmp_space_used == 0 ||
1830 !debug_assert_on_not_freed_memory);
1831 }
1832 mysql_audit_init_thd(this);
1833 change_user(); // Calls cleanup() & init()
1834 get_stmt_da()->reset_diagnostics_area();
1835 main_security_ctx.init();
1836 failed_com_change_user= 0;
1837 is_fatal_error= 0;
1838 client_capabilities= 0;
1839 peer_port= 0;
1840 query_name_consts= 0; // Safety
1841 abort_on_warning= 0;
1842 free_connection_done= 0;
1843 m_command= COM_CONNECT;
1844 proc_info= "login"; // Same as in THD::THD()
1845 transaction->on= 1;
1846 status_var.flush_status_time= my_time(0);
1847#if defined(ENABLED_PROFILING)
1848 profiling.reset();
1849#endif
1850#ifdef SIGNAL_WITH_VIO_CLOSE
1851 active_vio = 0;
1852#endif
1853#ifdef WITH_WSREP
1854 wsrep_free_status(this);
1855 wsrep_cs().reset_error();
1856 wsrep_aborter= 0;
1857 wsrep_abort_by_kill= NOT_KILLED;
1858 my_free(wsrep_abort_by_kill_err);
1859 wsrep_abort_by_kill_err= 0;
1860#ifndef DBUG_OFF
1861 wsrep_killed_state= 0;
1862#endif /* DBUG_OFF */
1863#endif /* WITH_WSREP */
1864}
1865
1866
1867THD::~THD()

Callers 1

create_thdMethod · 0.80

Calls 7

mysql_audit_init_thdFunction · 0.85
change_userFunction · 0.85
wsrep_free_statusFunction · 0.85
my_freeFunction · 0.85
initMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected