1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00
This commit is contained in:
Brave Galera Crew
2019-01-23 15:30:00 +04:00
committed by Sergey Vojtovich
parent 382115b992
commit 36a2a185fe
791 changed files with 28035 additions and 8865 deletions

View File

@@ -5780,6 +5780,14 @@ compare_errors:
"unexpected success or fatal error"),
thd->get_db(), query_arg);
thd->is_slave_error= 1;
#ifdef WITH_WSREP
if (thd->wsrep_apply_toi && wsrep_must_ignore_error(thd))
{
thd->clear_error(1);
thd->killed= NOT_KILLED;
thd->wsrep_has_ignored_error= true;
}
#endif /* WITH_WSREP */
}
/*
@@ -11287,13 +11295,13 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
{
WSREP_WARN("BF applier failed to open_and_lock_tables: %u, fatal: %d "
"wsrep = (exec_mode: %d conflict_state: %d seqno: %lld)",
thd->get_stmt_da()->sql_errno(),
thd->is_fatal_error,
thd->wsrep_exec_mode,
thd->wsrep_conflict_state,
(long long)wsrep_thd_trx_seqno(thd));
thd->get_stmt_da()->sql_errno(),
thd->is_fatal_error,
thd->wsrep_cs().mode(),
thd->wsrep_trx().state(),
(long long) wsrep_thd_trx_seqno(thd));
}
#endif
#endif /* WITH_WSREP */
if ((thd->is_slave_error || thd->is_fatal_error) &&
!is_parallel_retry_error(rgi, actual_error))
{
@@ -11430,10 +11438,10 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
#ifdef HAVE_QUERY_CACHE
#ifdef WITH_WSREP
/*
Moved invalidation right before the call to rows_event_stmt_cleanup(),
to avoid query cache being polluted with stale entries.
Moved invalidation right before the call to rows_event_stmt_cleanup(),
to avoid query cache being polluted with stale entries,
*/
if (! (WSREP(thd) && (thd->wsrep_exec_mode == REPL_RECV)))
if (! (WSREP(thd) && wsrep_thd_is_applying(thd)))
{
#endif /* WITH_WSREP */
query_cache.invalidate_locked_for_write(thd, rgi->tables_to_lock);
@@ -11546,6 +11554,13 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
bool ignored_error= (idempotent_error == 0 ?
ignored_error_code(actual_error) : 0);
#ifdef WITH_WSREP
if (WSREP(thd) && wsrep_ignored_error_code(this, actual_error))
{
idempotent_error= true;
thd->wsrep_has_ignored_error= true;
}
#endif /* WITH_WSREP */
if (idempotent_error || ignored_error)
{
if (global_system_variables.log_warnings)
@@ -11633,7 +11648,7 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
restore_empty_query_table_list(thd->lex);
#if defined(WITH_WSREP) && defined(HAVE_QUERY_CACHE)
if (WSREP(thd) && thd->wsrep_exec_mode == REPL_RECV)
if (WSREP(thd) && wsrep_thd_is_applying(thd))
{
query_cache.invalidate_locked_for_write(thd, rgi->tables_to_lock);
}