diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 8dc07ee36e8..ebb189e7762 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -8771,6 +8771,15 @@ wsrep_status_t wsrep_commit_cb(void* const ctx, Relay_log_info* wsrep_relay_log_init(const char* log_fname) { Relay_log_info* rli= new Relay_log_info(false); + LEX_STRING conn = {"wsrep",5}; + + /* + * problem is that mariaDB requires master info for rli, and wsrep replication + * really should not have it. Allocating empty mi here just for the sake of + * getting rpl_filter pointer initialized for mi, rpl_filter will be needed in + * several places + */ + rli->mi= new Master_info(&conn, false); rli->no_storage= true; if (!rli->relay_log.description_event_for_exec) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 7209b8bc42d..243106afd5a 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -3233,10 +3233,6 @@ innobase_commit_low( /*================*/ trx_t* trx) /*!< in: transaction handle */ { - if (trx_is_started(trx)) { - - trx_commit_for_mysql(trx); - } #ifdef WITH_WSREP THD* thd = (THD*)trx->mysql_thd; const char* tmp = 0; @@ -3254,7 +3250,10 @@ innobase_commit_low( #endif /* WSREP_PROC_INFO */ } #endif /* WITH_WSREP */ - trx_commit_for_mysql(trx); + if (trx_is_started(trx)) { + + trx_commit_for_mysql(trx); + } #ifdef WITH_WSREP if (wsrep_on((void*)thd)) { thd_proc_info(thd, tmp); } #endif /* WITH_WSREP */ diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index d493902726b..1ec7e8ba7ad 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -4325,7 +4325,6 @@ lock_table_create( ut_ad(table->n_ref_count > 0 || !table->can_be_evicted); UT_LIST_ADD_LAST(trx_locks, trx->lock.trx_locks, lock); - UT_LIST_ADD_LAST(un_member.tab_lock.locks, table->locks, lock); #ifdef WITH_WSREP if (c_lock && wsrep_thd_is_brute_force(trx->mysql_thd)) { UT_LIST_INSERT_AFTER( diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index a8d40d0cba3..c56fe948ef5 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -874,7 +874,7 @@ trx_write_serialisation_history( /* Update latest MySQL wsrep XID in trx sys header. */ if (wsrep_is_wsrep_xid(&trx->xid)) { - trx_sys_update_wsrep_checkpoint(&trx->xid, &mtr); + //trx_sys_update_wsrep_checkpoint(&trx->xid, &mtr); } #endif /* WITH_WSREP */ @@ -1289,10 +1289,6 @@ trx_commit_or_rollback_prepare( switch (trx->state) { case TRX_STATE_NOT_STARTED: -#ifdef WITH_WSREP - ut_d(trx->start_file = __FILE__); - ut_d(trx->start_line = __LINE__); -#endif /* WITH_WSREP */ trx_start_low(trx); /* fall through */ case TRX_STATE_ACTIVE: @@ -2067,10 +2063,6 @@ trx_start_if_not_started_xa( transaction, doesn't. */ trx->support_xa = thd_supports_xa(trx->mysql_thd); -#ifdef WITH_WSREP - ut_d(trx->start_file = __FILE__); - ut_d(trx->start_line = __LINE__); -#endif /* WITH_WSREP */ trx_start_low(trx); /* fall through */ case TRX_STATE_ACTIVE: @@ -2093,10 +2085,6 @@ trx_start_if_not_started( { switch (trx->state) { case TRX_STATE_NOT_STARTED: -#ifdef WITH_WSREP - ut_d(trx->start_file = __FILE__); - ut_d(trx->start_line = __LINE__); -#endif /* WITH_WSREP */ trx_start_low(trx); /* fall through */ case TRX_STATE_ACTIVE: