mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Initial merge result with mariaDB 10: lp:maria
This commit is contained in:
@ -3490,7 +3490,9 @@ Prepared_statement::set_parameters(String *expanded_query,
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
void wsrep_replay_transaction(THD *thd);
|
||||
#endif /* WITH_WSREP */
|
||||
/**
|
||||
Execute a prepared statement. Re-prepare it a limited number
|
||||
of times if necessary.
|
||||
@ -3570,6 +3572,22 @@ reexecute:
|
||||
error= execute(expanded_query, open_cursor) || thd->is_error();
|
||||
|
||||
thd->m_reprepare_observer= NULL;
|
||||
#ifdef WITH_WSREP
|
||||
mysql_mutex_lock(&thd->LOCK_wsrep_thd);
|
||||
switch (thd->wsrep_conflict_state)
|
||||
{
|
||||
case CERT_FAILURE:
|
||||
WSREP_DEBUG("PS execute fail for CERT_FAILURE: thd: %ld err: %d",
|
||||
thd->thread_id, thd->stmt_da->sql_errno() );
|
||||
thd->wsrep_conflict_state = NO_CONFLICT;
|
||||
break;
|
||||
|
||||
case MUST_REPLAY:
|
||||
(void)wsrep_replay_transaction(thd);
|
||||
default: break;
|
||||
}
|
||||
mysql_mutex_unlock(&thd->LOCK_wsrep_thd);
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
if (error && !thd->is_fatal_error && !thd->killed &&
|
||||
reprepare_observer.is_invalidated() &&
|
||||
|
Reference in New Issue
Block a user