mirror of
https://github.com/MariaDB/server.git
synced 2025-09-11 05:52:26 +03:00
Merge branch '11.1' into 11.2
This commit is contained in:
@@ -1246,7 +1246,9 @@ void THD::init()
|
||||
|
||||
user_time.val= start_time= start_time_sec_part= 0;
|
||||
|
||||
server_status= SERVER_STATUS_AUTOCOMMIT;
|
||||
server_status= 0;
|
||||
if (variables.option_bits & OPTION_AUTOCOMMIT)
|
||||
server_status|= SERVER_STATUS_AUTOCOMMIT;
|
||||
if (variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)
|
||||
server_status|= SERVER_STATUS_NO_BACKSLASH_ESCAPES;
|
||||
if (variables.sql_mode & MODE_ANSI_QUOTES)
|
||||
@@ -1605,6 +1607,10 @@ void THD::free_connection()
|
||||
vio_delete(net.vio);
|
||||
net.vio= nullptr;
|
||||
net_end(&net);
|
||||
delete(rgi_fake);
|
||||
rgi_fake= NULL;
|
||||
delete(rli_fake);
|
||||
rli_fake= NULL;
|
||||
#endif
|
||||
if (!cleanup_done)
|
||||
cleanup();
|
||||
@@ -1643,6 +1649,7 @@ void THD::reset_for_reuse()
|
||||
abort_on_warning= 0;
|
||||
free_connection_done= 0;
|
||||
m_command= COM_CONNECT;
|
||||
proc_info= "login"; // Same as in THD::THD()
|
||||
transaction->on= 1;
|
||||
#if defined(ENABLED_PROFILING)
|
||||
profiling.reset();
|
||||
@@ -1655,6 +1662,7 @@ void THD::reset_for_reuse()
|
||||
wsrep_cs().reset_error();
|
||||
wsrep_aborter= 0;
|
||||
wsrep_abort_by_kill= NOT_KILLED;
|
||||
my_free(wsrep_abort_by_kill_err);
|
||||
wsrep_abort_by_kill_err= 0;
|
||||
#ifndef DBUG_OFF
|
||||
wsrep_killed_state= 0;
|
||||
@@ -1697,6 +1705,8 @@ THD::~THD()
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
mysql_cond_destroy(&COND_wsrep_thd);
|
||||
my_free(wsrep_abort_by_kill_err);
|
||||
wsrep_abort_by_kill_err= 0;
|
||||
#endif
|
||||
mdl_context.destroy();
|
||||
|
||||
@@ -1709,17 +1719,6 @@ THD::~THD()
|
||||
dbug_sentry= THD_SENTRY_GONE;
|
||||
#endif
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
if (rgi_fake)
|
||||
{
|
||||
delete rgi_fake;
|
||||
rgi_fake= NULL;
|
||||
}
|
||||
if (rli_fake)
|
||||
{
|
||||
delete rli_fake;
|
||||
rli_fake= NULL;
|
||||
}
|
||||
|
||||
if (rgi_slave)
|
||||
rgi_slave->cleanup_after_session();
|
||||
my_free(semisync_info);
|
||||
@@ -1727,6 +1726,7 @@ THD::~THD()
|
||||
main_lex.free_set_stmt_mem_root();
|
||||
free_root(&main_mem_root, MYF(0));
|
||||
my_free(m_token_array);
|
||||
my_free(killed_err);
|
||||
main_da.free_memory();
|
||||
if (tdc_hash_pins)
|
||||
lf_hash_put_pins(tdc_hash_pins);
|
||||
@@ -2143,7 +2143,11 @@ void THD::reset_killed()
|
||||
mysql_mutex_assert_not_owner(&LOCK_thd_kill);
|
||||
mysql_mutex_lock(&LOCK_thd_kill);
|
||||
killed= NOT_KILLED;
|
||||
killed_err= 0;
|
||||
if (unlikely(killed_err))
|
||||
{
|
||||
my_free(killed_err);
|
||||
killed_err= 0;
|
||||
}
|
||||
mysql_mutex_unlock(&LOCK_thd_kill);
|
||||
}
|
||||
#ifdef WITH_WSREP
|
||||
@@ -2154,6 +2158,7 @@ void THD::reset_killed()
|
||||
mysql_mutex_assert_not_owner(&LOCK_thd_kill);
|
||||
mysql_mutex_lock(&LOCK_thd_kill);
|
||||
wsrep_abort_by_kill= NOT_KILLED;
|
||||
my_free(wsrep_abort_by_kill_err);
|
||||
wsrep_abort_by_kill_err= 0;
|
||||
mysql_mutex_unlock(&LOCK_thd_kill);
|
||||
}
|
||||
@@ -5936,8 +5941,6 @@ void THD::set_examined_row_count(ha_rows count)
|
||||
void THD::inc_sent_row_count(ha_rows count)
|
||||
{
|
||||
m_sent_row_count+= count;
|
||||
DBUG_EXECUTE_IF("debug_huge_number_of_examined_rows",
|
||||
m_examined_row_count= (ULONGLONG_MAX - 1000000););
|
||||
MYSQL_SET_STATEMENT_ROWS_SENT(m_statement_psi, m_sent_row_count);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user