diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/log_event_server.cc | 7 | ||||
-rw-r--r-- | sql/share/errmsg-utf8.txt | 7 | ||||
-rw-r--r-- | sql/sql_acl.cc | 4 | ||||
-rw-r--r-- | sql/sql_class.h | 2 |
4 files changed, 16 insertions, 4 deletions
diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc index 2cae9f60e4e..c137a3b3621 100644 --- a/sql/log_event_server.cc +++ b/sql/log_event_server.cc @@ -1921,6 +1921,13 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi, thd->update_server_status(); log_slow_statement(thd); thd->lex->restore_set_statement_var(); + + /* + When THD::slave_expected_error gets reset inside execution stack + that is the case of to be ignored event. In this case the expected + error must change to the reset value as well. + */ + expected_error= thd->slave_expected_error; } thd->variables.option_bits&= ~OPTION_MASTER_SQL_ERROR; diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index b04b0efbc03..de3f0e74155 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -7535,9 +7535,10 @@ ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS eng "Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction" spa "La sentencia no es segura porque accede a una tabla no transaccional tras acceder a una transaccional dentro de la misma transacción" ER_MESSAGE_AND_STATEMENT - chi "%s语句:%s" - eng "%s Statement: %s" - spa "%s Sentencia: %s" + chi "%s.语句:%s" + eng "%s. Statement: %s" + spa "%s. Sentencia: %s" + ER_SLAVE_CONVERSION_FAILED chi "列%d表'%-.192s.%-.192s'无法从'%-.50s'类型为'%-.50s'" eng "Column %d of table '%-.192s.%-.192s' cannot be converted from type '%-.50s' to type '%-.50s'" diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 999f7d5b836..e4a929e8747 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2094,9 +2094,11 @@ class Grant_tables some kind of updates to the mysql.% tables. */ Rpl_filter *rpl_filter= thd->system_thread_info.rpl_sql_info->rpl_filter; - if (rpl_filter->is_on() && !rpl_filter->tables_ok(0, tables)) + { + thd->slave_expected_error= 0; DBUG_RETURN(1); + } } DBUG_RETURN(0); } diff --git a/sql/sql_class.h b/sql/sql_class.h index 1d13a5be8af..c0aa56f5355 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3616,6 +3616,8 @@ public: /* In case of a slave, set to the error code the master got when executing the query. 0 if no error on the master. + The stored into variable master error code may get reset inside + execution stack when the event turns out to be ignored. */ int slave_expected_error; enum_sql_command last_sql_command; // Last sql_command exceuted in mysql_execute_command() |