diff options
Diffstat (limited to 'sql/wsrep_thd.cc')
-rw-r--r-- | sql/wsrep_thd.cc | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index ef8c0e132f7..6fd57edc692 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -13,8 +13,8 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA. */ +#include "mariadb.h" #include "wsrep_thd.h" - #include "transaction.h" #include "rpl_rli.h" #include "log_event.h" @@ -106,7 +106,7 @@ static rpl_group_info* wsrep_relay_group_init(THD *thd, const char* log_fname) new Format_description_log_event(4); } - static LEX_STRING connection_name= { C_STRING_WITH_LEN("wsrep") }; + static LEX_CSTRING connection_name= { STRING_WITH_LEN("wsrep") }; /* Master_info's constructor initializes rpl_filter by either an already @@ -169,22 +169,23 @@ static void wsrep_prepare_bf_thd(THD *thd, struct wsrep_thd_shadow* shadow) thd->variables.tx_isolation = ISO_READ_COMMITTED; thd->tx_isolation = ISO_READ_COMMITTED; - shadow->db = thd->db; - shadow->db_length = thd->db_length; + shadow->db = thd->db.str; + shadow->db_length = thd->db.length; shadow->user_time = thd->user_time; shadow->row_count_func= thd->get_row_count_func(); - thd->reset_db(NULL, 0); + thd->reset_db(&null_clex_str); } static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow) { + LEX_CSTRING db= {shadow->db, shadow->db_length }; thd->variables.option_bits = shadow->options; thd->server_status = shadow->server_status; thd->wsrep_exec_mode = shadow->wsrep_exec_mode; thd->net.vio = shadow->vio; thd->variables.tx_isolation = shadow->tx_isolation; thd->user_time = shadow->user_time; - thd->reset_db(shadow->db, shadow->db_length); + thd->reset_db(&db); if (!thd->slave_thread) delete thd->system_thread_info.rpl_sql_info; @@ -280,7 +281,7 @@ void wsrep_replay_sp_transaction(THD* thd) default: WSREP_ERROR("trx_replay failed for: %d, schema: %s, query: %s", rcode, - (thd->db ? thd->db : "(null)"), + (thd->db.str ? thd->db.str : "(null)"), WSREP_QUERY(thd)); /* we're now in inconsistent state, must abort */ mysql_mutex_unlock(&thd->LOCK_thd_data); @@ -361,7 +362,7 @@ void wsrep_replay_transaction(THD *thd) MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da()); thd->m_statement_psi= NULL; thd->m_digest= NULL; - thd_proc_info(thd, "wsrep replaying trx"); + thd_proc_info(thd, "WSREP replaying trx"); WSREP_DEBUG("replay trx: %s %lld", thd->query() ? thd->query() : "void", (long long)wsrep_thd_trx_seqno(thd)); @@ -438,15 +439,13 @@ void wsrep_replay_transaction(THD *thd) else { WSREP_DEBUG("replay failed, rolling back"); - //my_error(ER_LOCK_DEADLOCK, MYF(0), "wsrep aborted transaction"); } thd->wsrep_conflict_state= ABORTED; wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle); break; default: WSREP_ERROR("trx_replay failed for: %d, schema: %s, query: %s", - rcode, - (thd->db ? thd->db : "(null)"), + rcode, thd->get_db(), thd->query() ? thd->query() : "void"); /* we're now in inconsistent state, must abort */ @@ -625,7 +624,7 @@ static void wsrep_rollback_process(THD *thd) wsrep_aborting_thd= NULL; while (thd->killed == NOT_KILLED) { - thd_proc_info(thd, "wsrep aborter idle"); + thd_proc_info(thd, "WSREP aborter idle"); thd->mysys_var->current_mutex= &LOCK_wsrep_rollback; thd->mysys_var->current_cond= &COND_wsrep_rollback; @@ -634,7 +633,7 @@ static void wsrep_rollback_process(THD *thd) WSREP_DEBUG("WSREP rollback thread wakes for signal"); mysql_mutex_lock(&thd->mysys_var->mutex); - thd_proc_info(thd, "wsrep aborter active"); + thd_proc_info(thd, "WSREP aborter active"); thd->mysys_var->current_mutex= 0; thd->mysys_var->current_cond= 0; mysql_mutex_unlock(&thd->mysys_var->mutex); |