summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-11-10 01:38:03 +0100
committerSergei Golubchik <serg@mariadb.org>2017-11-10 01:38:03 +0100
commit2a4e4335c4bcb7f7488c9b91bdc8a2da3da5cf61 (patch)
treeeadf9e2e8c0d2fccdd1db226395b8232b67737d6 /sql/sql_class.cc
parent7002291b8aa2e036a7adfd23d961dc09b4f01f46 (diff)
parent9572bbdc3791178b82d4c71a8e3948a3a35123d4 (diff)
downloadmariadb-git-2a4e4335c4bcb7f7488c9b91bdc8a2da3da5cf61.tar.gz
Merge branch 'github/10.0-galera' into 10.1
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index c12f1ec4dc8..2ebcea2d6f4 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -4858,11 +4858,14 @@ extern "C" int thd_non_transactional_update(const MYSQL_THD thd)
extern "C" int thd_binlog_format(const MYSQL_THD thd)
{
- if (((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()) &&
- thd->variables.option_bits & OPTION_BIN_LOG)
+ if (WSREP(thd))
+ {
+ /* for wsrep binlog format is meaningful also when binlogging is off */
return (int) thd->wsrep_binlog_format();
- else
- return BINLOG_FORMAT_UNSPEC;
+ }
+ if (mysql_bin_log.is_open() && (thd->variables.option_bits & OPTION_BIN_LOG))
+ return (int) thd->variables.binlog_format;
+ return BINLOG_FORMAT_UNSPEC;
}
extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all)