diff options
author | Sachin Setiya <sachin.setiya@mariadb.com> | 2017-04-27 21:20:02 +0530 |
---|---|---|
committer | Sachin Setiya <sachin.setiya@mariadb.com> | 2017-04-27 21:20:02 +0530 |
commit | eb55a9df5253adb4f6d44e48d4097db8dc483949 (patch) | |
tree | 09990186f56579aff25346a3d6ac01d60463d792 /sql/sys_vars.cc | |
parent | 3167c91244a5fcf669be87dda674a5cab3d8a78a (diff) | |
download | mariadb-git-eb55a9df5253adb4f6d44e48d4097db8dc483949.tar.gz |
Mdev-12017 Post Fix
Allow setting up binlog_format other then row for session scope for galera/
flashback.
Ref:- Mdev-7322
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r-- | sql/sys_vars.cc | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 73ce519e858..209b17ff377 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -456,13 +456,24 @@ 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]); - 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; + /* + 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) + { + 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; + } } if (var->type == OPT_GLOBAL) |