mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge tag 'mariadb-5.5.43' into 5.5-galera
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2014, SkySQL Ab.
|
||||
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2015, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -989,7 +989,7 @@ THD::THD()
|
||||
failed_com_change_user(0),
|
||||
is_fatal_error(0),
|
||||
transaction_rollback_request(0),
|
||||
is_fatal_sub_stmt_error(0),
|
||||
is_fatal_sub_stmt_error(false),
|
||||
rand_used(0),
|
||||
time_zone_used(0),
|
||||
in_lock_tables(0),
|
||||
@@ -1623,6 +1623,7 @@ void THD::cleanup(void)
|
||||
mysql_ha_cleanup(this);
|
||||
locked_tables_list.unlock_locked_tables(this);
|
||||
|
||||
delete_dynamic(&user_var_events);
|
||||
close_temporary_tables(this);
|
||||
|
||||
transaction.xid_state.xa_state= XA_NOTR;
|
||||
@@ -1656,7 +1657,6 @@ void THD::cleanup(void)
|
||||
debug_sync_end_thread(this);
|
||||
#endif /* defined(ENABLED_DEBUG_SYNC) */
|
||||
|
||||
delete_dynamic(&user_var_events);
|
||||
my_hash_free(&user_vars);
|
||||
sp_cache_clear(&sp_proc_cache);
|
||||
sp_cache_clear(&sp_func_cache);
|
||||
@@ -4297,7 +4297,8 @@ extern "C" int thd_binlog_format(const MYSQL_THD thd)
|
||||
|
||||
extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all)
|
||||
{
|
||||
mark_transaction_to_rollback(thd, all);
|
||||
DBUG_ASSERT(thd);
|
||||
thd->mark_transaction_to_rollback(all);
|
||||
}
|
||||
|
||||
extern "C" bool thd_binlog_filter_ok(const MYSQL_THD thd)
|
||||
@@ -4493,9 +4494,12 @@ void THD::restore_sub_statement_state(Sub_statement_state *backup)
|
||||
If we've left sub-statement mode, reset the fatal error flag.
|
||||
Otherwise keep the current value, to propagate it up the sub-statement
|
||||
stack.
|
||||
|
||||
NOTE: is_fatal_sub_stmt_error can be set only if we've been in the
|
||||
sub-statement mode.
|
||||
*/
|
||||
if (!in_sub_stmt)
|
||||
is_fatal_sub_stmt_error= FALSE;
|
||||
is_fatal_sub_stmt_error= false;
|
||||
|
||||
if ((variables.option_bits & OPTION_BIN_LOG) && is_update_query(lex->sql_command) &&
|
||||
!is_current_stmt_binlog_format_row())
|
||||
@@ -4605,17 +4609,18 @@ void THD::get_definer(LEX_USER *definer)
|
||||
/**
|
||||
Mark transaction to rollback and mark error as fatal to a sub-statement.
|
||||
|
||||
@param thd Thread handle
|
||||
@param all TRUE <=> rollback main transaction.
|
||||
*/
|
||||
|
||||
void mark_transaction_to_rollback(THD *thd, bool all)
|
||||
void THD::mark_transaction_to_rollback(bool all)
|
||||
{
|
||||
if (thd)
|
||||
{
|
||||
thd->is_fatal_sub_stmt_error= TRUE;
|
||||
thd->transaction_rollback_request= all;
|
||||
}
|
||||
/*
|
||||
There is no point in setting is_fatal_sub_stmt_error unless
|
||||
we are actually in_sub_stmt.
|
||||
*/
|
||||
if (in_sub_stmt)
|
||||
is_fatal_sub_stmt_error= true;
|
||||
transaction_rollback_request= all;
|
||||
}
|
||||
/***************************************************************************
|
||||
Handling of XA id cacheing
|
||||
|
||||
Reference in New Issue
Block a user