summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsjaakola <seppo.jaakola@iki.fi>2017-07-27 11:39:31 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2017-11-08 13:36:19 +0200
commit7cedebb99bc26d26f2dc614e8246e8592d03bab9 (patch)
tree8b720de0d676b098a913295df7814c0e0e976887
parentb79407c5e9fd4f5e43feb9de05306a404f15905c (diff)
downloadmariadb-git-7cedebb99bc26d26f2dc614e8246e8592d03bab9.tar.gz
MW-394
* changed thd_binlog_format to return configured binlog format in wsrep execution, regardless of binlogging setting (i.e. with or without binlogging) * thd_binlog_format is used in innobase::write_row(), and would return confusing result there when log_bin==OFF
-rw-r--r--sql/sql_class.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 85d5f5206a8..3aedbe72229 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -4769,11 +4769,13 @@ extern "C" int thd_non_transactional_update(const MYSQL_THD thd)
extern "C" int thd_binlog_format(const MYSQL_THD thd)
{
#ifdef WITH_WSREP
- if (((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()) &&
- (thd->variables.option_bits & OPTION_BIN_LOG))
-#else
+ if (WSREP(thd))
+ {
+ /* for wsrep binlog format is meaningful also when binlogging is off */
+ return (int) WSREP_BINLOG_FORMAT(thd->variables.binlog_format);
+ }
+#endif /* WITH_WSREP */
if (mysql_bin_log.is_open() && (thd->variables.option_bits & OPTION_BIN_LOG))
-#endif
return (int) WSREP_FORMAT(thd->variables.binlog_format);
else
return BINLOG_FORMAT_UNSPEC;