Commit 595bcb79 authored by Jan Lindström's avatar Jan Lindström

Fix merge error on binlog_remove_pending_rows causing failure

on binlog_innodb_row test.
parent b67e1d3c
......@@ -1083,6 +1083,13 @@ end:
DBUG_RETURN(error);
}
static inline TC_LOG *get_tc_log_implementation()
{
if (total_ha_2pc <= 1)
return &tc_log_dummy;
if (opt_bin_log)
return &mysql_bin_log;
return &tc_log_mmap;
}
#endif /* LOG_H */
......@@ -5204,27 +5204,12 @@ a file name for --log-bin-index option", opt_binlog_index_name);
}
#endif
/* if total_ha_2pc <= 1
tc_log = tc_log_dummy
else
if opt_bin_log == true
tc_log = mysql_bin_log
else
if WITH_WSREP
if WSREP_ON
tc_log = tc_log_dummy
else
tc_log = tc_log_mmap
else
tc_log=tc_log_mmap
*/
tc_log= (total_ha_2pc > 1 ? (opt_bin_log ?
(TC_LOG *) &mysql_bin_log :
IF_WSREP((WSREP_ON ? (TC_LOG *) &tc_log_dummy :
(TC_LOG *) &tc_log_mmap), (TC_LOG *) &tc_log_mmap)) :
(TC_LOG *) &tc_log_dummy);
tc_log= get_tc_log_implementation();
#ifdef WITH_WSREP
if (WSREP_ON && tc_log == &tc_log_mmap)
tc_log= &tc_log_dummy;
WSREP_DEBUG("Initial TC log open: %s",
(tc_log == &mysql_bin_log) ? "binlog" :
(tc_log == &tc_log_mmap) ? "mmap" :
......
......@@ -5793,8 +5793,8 @@ int THD::binlog_remove_pending_rows_event(bool clear_maps,
{
DBUG_ENTER("THD::binlog_remove_pending_rows_event");
IF_WSREP(!(WSREP_EMULATE_BINLOG(this) || mysql_bin_log.is_open()),
!mysql_bin_log.is_open());
if(IF_WSREP(!(WSREP_EMULATE_BINLOG(this) || mysql_bin_log.is_open()),
!mysql_bin_log.is_open()))
DBUG_RETURN(0);
/* Ensure that all events in a GTID group are in the same cache */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment