summaryrefslogtreecommitdiff
path: root/sql/sys_vars.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r--sql/sys_vars.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index b4583b1c187..e5fe26c6b94 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -456,11 +456,22 @@ static bool binlog_format_check(sys_var *self, THD *thd, set_var *var)
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
"MariaDB Galera and flashback do not support binlog format: %s",
binlog_format_names[var->save_result.ulonglong_value]);
+ /*
+ We allow setting up binlog_format other then ROW for session scope when
+ wsrep/flasback is enabled.This is done because of 2 reasons
+ 1. User might want to run pt-table-checksum.
+ 2. SuperUser knows what is doing :-)
+ For refrence:- MDEV-7322
+ */
if (var->type == OPT_GLOBAL)
{
- WSREP_ERROR("MariaDB Galera and flashback do not support binlog format: %s",
- binlog_format_names[var->save_result.ulonglong_value]);
+ if (WSREP(thd))
+ WSREP_ERROR("MariaDB Galera does not support binlog format: %s",
+ binlog_format_names[var->save_result.ulonglong_value]);
+ else
+ my_error(ER_FLASHBACK_NOT_SUPPORTED,MYF(0),"binlog_format",
+ binlog_format_names[var->save_result.ulonglong_value]);
return true;
}
}