diff options
author | Jan Lindström <jan.lindstrom@skysql.com> | 2014-09-10 18:48:26 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@skysql.com> | 2014-09-10 18:48:26 +0300 |
commit | 595bcb7947716e7b1758ae7c14ef29c5bbb7630e (patch) | |
tree | 7add82cbff15513e3f1ff7185ddefacd5bb0b141 /sql | |
parent | b67e1d3c98a221feb790a666c3ed7e10e02d9e88 (diff) | |
download | mariadb-git-595bcb7947716e7b1758ae7c14ef29c5bbb7630e.tar.gz |
Fix merge error on binlog_remove_pending_rows causing failure
on binlog_innodb_row test.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/log.h | 9 | ||||
-rw-r--r-- | sql/mysqld.cc | 23 | ||||
-rw-r--r-- | sql/sql_class.cc | 4 |
3 files changed, 14 insertions, 22 deletions
diff --git a/sql/log.h b/sql/log.h index 3e9a11b8b94..619d7ed19cd 100644 --- a/sql/log.h +++ b/sql/log.h @@ -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 */ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b077563918f..0794d7fee61 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -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" : diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 8bceffca0bd..db2638254ec 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -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 */ |