summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-05-19 20:55:37 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-05-19 20:55:37 +0200
commitc07325f932abef2032b2e56532f6cb615e2a1161 (patch)
tree754ca158e45ebc014e5cbeaf4c3e7581f9575d76 /sql/log_event.cc
parent7f8187bc432f79afe4c0549d68845a68e6c159ab (diff)
parent2ae83affef5a4d89f38272db31a400f968279a7a (diff)
downloadmariadb-git-c07325f932abef2032b2e56532f6cb615e2a1161.tar.gz
Merge branch '10.3' into 10.4
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc25
1 files changed, 15 insertions, 10 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 1246330f7bb..95d602a0d8e 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2018, Oracle and/or its affiliates.
+ Copyright (c) 2000, 2019, Oracle and/or its affiliates.
Copyright (c) 2009, 2019, MariaDB
This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#include "mariadb.h"
@@ -39,6 +39,7 @@
#include "transaction.h"
#include <my_dir.h>
#include "sql_show.h" // append_identifier
+#include "debug_sync.h" // debug_sync
#include <mysql/psi/mysql_statement.h>
#include <strfunc.h>
#include "compat56.h"
@@ -11297,6 +11298,12 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
/* A small test to verify that objects have consistent types */
DBUG_ASSERT(sizeof(thd->variables.option_bits) == sizeof(OPTION_RELAXED_UNIQUE_CHECKS));
+ DBUG_EXECUTE_IF("rows_log_event_before_open_table",
+ {
+ const char action[] = "now SIGNAL before_open_table WAIT_FOR go_ahead_sql";
+ DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(action)));
+ };);
+
if (slave_run_triggers_for_rbr)
{
LEX *lex= thd->lex;
@@ -11321,7 +11328,6 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
}
if (unlikely(open_and_lock_tables(thd, rgi->tables_to_lock, FALSE, 0)))
{
- uint actual_error= thd->get_stmt_da()->sql_errno();
#ifdef WITH_WSREP
if (WSREP(thd))
{
@@ -11334,23 +11340,22 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
(long long) wsrep_thd_trx_seqno(thd));
}
#endif /* WITH_WSREP */
- if ((thd->is_slave_error || thd->is_fatal_error) &&
- !is_parallel_retry_error(rgi, actual_error))
+ if (thd->is_error() &&
+ !is_parallel_retry_error(rgi, error= thd->get_stmt_da()->sql_errno()))
{
/*
Error reporting borrowed from Query_log_event with many excessive
- simplifications.
+ simplifications.
We should not honour --slave-skip-errors at this point as we are
- having severe errors which should not be skiped.
+ having severe errors which should not be skipped.
*/
- rli->report(ERROR_LEVEL, actual_error, rgi->gtid_info(),
+ rli->report(ERROR_LEVEL, error, rgi->gtid_info(),
"Error executing row event: '%s'",
- (actual_error ? thd->get_stmt_da()->message() :
+ (error ? thd->get_stmt_da()->message() :
"unexpected success or fatal error"));
thd->is_slave_error= 1;
}
/* remove trigger's tables */
- error= actual_error;
goto err;
}