1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

cleanup: galera merge, simple changes

This commit is contained in:
Sergei Golubchik
2014-09-25 23:00:45 +02:00
parent b04f848176
commit 3620910eea
69 changed files with 492 additions and 699 deletions

View File

@@ -1384,7 +1384,7 @@ int ha_commit_trans(THD *thd, bool all)
mdl_request.init(MDL_key::COMMIT, "", "", MDL_INTENTION_EXCLUSIVE,
MDL_EXPLICIT);
if (IF_WSREP(!WSREP(thd),1) &&
if (!WSREP(thd) &&
thd->mdl_context.acquire_lock(&mdl_request,
thd->variables.lock_wait_timeout))
{
@@ -1462,13 +1462,11 @@ int ha_commit_trans(THD *thd, bool all)
DEBUG_SYNC(thd, "ha_commit_trans_after_prepare");
DBUG_EXECUTE_IF("crash_commit_after_prepare", DBUG_SUICIDE(););
#ifdef WITH_WSREP
if (!error && WSREP_ON && wsrep_is_wsrep_xid(&thd->transaction.xid_state.xid))
{
// xid was rewritten by wsrep
xid= wsrep_xid_seqno(&thd->transaction.xid_state.xid);
}
#endif // WITH_WSREP
if (!is_real_trans)
{
@@ -1846,10 +1844,9 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
got, hton_name(hton)->str);
for (int i=0; i < got; i ++)
{
my_xid x= IF_WSREP(WSREP_ON && wsrep_is_wsrep_xid(&info->list[i]) ?
my_xid x= WSREP_ON && wsrep_is_wsrep_xid(&info->list[i]) ?
wsrep_xid_seqno(&info->list[i]) :
info->list[i].get_my_xid(),
info->list[i].get_my_xid());
info->list[i].get_my_xid();
if (!x) // not "mine" - that is generated by external TM
{
#ifndef DBUG_OFF
@@ -3134,7 +3131,7 @@ int handler::update_auto_increment()
variables->auto_increment_increment);
auto_inc_intervals_count++;
/* Row-based replication does not need to store intervals in binlog */
if (IF_WSREP(((WSREP(thd) && wsrep_emulate_bin_log ) || mysql_bin_log.is_open()), mysql_bin_log.is_open())
if (((WSREP(thd) && wsrep_emulate_bin_log ) || mysql_bin_log.is_open())
&& !thd->is_current_stmt_binlog_format_row())
thd->auto_inc_intervals_in_cur_stmt_for_binlog.
append(auto_inc_interval_for_cur_row.minimum(),
@@ -5754,13 +5751,13 @@ static bool check_table_binlog_row_based(THD *thd, TABLE *table)
DBUG_ASSERT(table->s->cached_row_logging_check == 0 ||
table->s->cached_row_logging_check == 1);
return (thd->is_current_stmt_binlog_format_row() &&
return thd->is_current_stmt_binlog_format_row() &&
table->s->cached_row_logging_check &&
(thd->variables.option_bits & OPTION_BIN_LOG) &&
/* applier and replayer should not binlog */
(IF_WSREP((WSREP_EMULATE_BINLOG(thd) &&
(thd->wsrep_exec_mode != REPL_RECV)) ||
mysql_bin_log.is_open(), mysql_bin_log.is_open())));
((IF_WSREP(WSREP_EMULATE_BINLOG(thd) &&
thd->wsrep_exec_mode != REPL_RECV, 0)) ||
mysql_bin_log.is_open());
}
@@ -5860,12 +5857,11 @@ static int binlog_log_row(TABLE* table,
bool error= 0;
THD *const thd= table->in_use;
#ifdef WITH_WSREP
/* only InnoDB tables will be replicated through binlog emulation */
if (WSREP_EMULATE_BINLOG(thd) &&
table->file->partition_ht()->db_type != DB_TYPE_INNODB)
return 0;
#endif /* WITH_WSREP */
if (check_table_binlog_row_based(thd, table))
{
MY_BITMAP cols;
@@ -6226,11 +6222,9 @@ int ha_abort_transaction(THD *bf_thd, THD *victim_thd, my_bool signal)
{
handlerton *hton= ha_info->ht();
if (!hton->abort_transaction)
{
WSREP_WARN("cannot abort transaction");
}
WSREP_WARN("cannot abort transaction");
else
hton->abort_transaction(hton, bf_thd, victim_thd, signal);
hton->abort_transaction(hton, bf_thd, victim_thd, signal);
ha_info_next= ha_info->next();
ha_info->reset(); /* keep it conveniently zero-filled */
}