diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-04-26 14:02:37 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-04-26 14:02:37 +0200 |
commit | 2ce52790ffc72c4a4d3670ebf67c6655450620f2 (patch) | |
tree | 4be382f34905809f0a19e87574e2b07b91f5cb7c /sql/log_event.cc | |
parent | caa9023c9ed101acbcf6b9bd821a09daeb8271ee (diff) | |
parent | 757daa4174ed1b8786d0307852f79885dd08ea89 (diff) | |
download | mariadb-git-2ce52790ffc72c4a4d3670ebf67c6655450620f2.tar.gz |
Merge branch '5.5' into 10.1
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index bb373a4ed84..a6091fcc28d 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2000, 2018, Oracle and/or its affiliates. - Copyright (c) 2009, 2018, MariaDB + 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 it under the terms of the GNU General Public License as published by @@ -40,6 +40,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" @@ -9910,6 +9911,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; @@ -9934,7 +9941,6 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi) } if (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)) { @@ -9947,23 +9953,22 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi) (long long)wsrep_thd_trx_seqno(thd)); } #endif - 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; } |