diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-05-04 17:04:55 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-05-04 17:04:55 +0200 |
commit | 8cbb14ef5d180687f131bc44a4e8fc84083d033c (patch) | |
tree | 091f11e2d20f95656a7b12294782eb0488fd4fcc /sql/log_event.cc | |
parent | 4345868382ca3525de5eb432302b6b9b957b47c1 (diff) | |
parent | b85aa20065504bdda4bc03c2bd7eb7de38865c5d (diff) | |
download | mariadb-git-8cbb14ef5d180687f131bc44a4e8fc84083d033c.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 7ebc75dd1bf..8aea32004c3 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 @@ -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" @@ -10777,6 +10778,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; @@ -10801,7 +10808,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)) { @@ -10814,23 +10820,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; } |