diff options
author | Seppo Jaakola <seppo.jaakola@codership.com> | 2013-07-13 13:01:13 +0300 |
---|---|---|
committer | Seppo Jaakola <seppo.jaakola@codership.com> | 2013-07-13 13:01:13 +0300 |
commit | 0a9216835f406947fb4d492616da4cda75e5e113 (patch) | |
tree | 7fbf5059c59fa86ca255452f3ce312aece492652 /sql/sql_prepare.cc | |
parent | 58926b5e1990d3245b55081ba511fbabe2604e17 (diff) | |
download | mariadb-git-0a9216835f406947fb4d492616da4cda75e5e113.tar.gz |
Initial merge result with mariaDB 10: lp:maria
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 025ff8820e6..7ccc6aaad39 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -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() && |