Commit eb55a9df authored by Sachin Setiya's avatar Sachin Setiya

Mdev-12017 Post Fix

Allow setting up binlog_format other then row for session scope for galera/
flashback.

Ref:- Mdev-7322
parent 3167c912
......@@ -503,7 +503,8 @@ a b
3 2
4 3
SET binlog_format=statement;
ERROR HY000: Flashback does not support binlog_format STATEMENT
Warnings:
Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT
SET GLOBAL binlog_format=statement;
ERROR HY000: Flashback does not support binlog_format STATEMENT
DROP TABLE t1;
......@@ -160,7 +160,6 @@ let $MYSQLD_DATADIR= `select @@datadir`;
SELECT * FROM t1;
--error ER_FLASHBACK_NOT_SUPPORTED
SET binlog_format=statement;
--error ER_FLASHBACK_NOT_SUPPORTED
SET GLOBAL binlog_format=statement;
......
foreign_key : MDEV-7915
binlog_format : MDEV-11532
......@@ -456,6 +456,16 @@ 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)
{
if (WSREP(thd))
WSREP_ERROR("MariaDB Galera does not support binlog format: %s",
binlog_format_names[var->save_result.ulonglong_value]);
......@@ -464,6 +474,7 @@ static bool binlog_format_check(sys_var *self, THD *thd, set_var *var)
binlog_format_names[var->save_result.ulonglong_value]);
return true;
}
}
if (var->type == OPT_GLOBAL)
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment