1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Mdev-12017 Post Fix

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

Ref:- Mdev-7322
This commit is contained in:
Sachin Setiya
2017-04-27 21:20:02 +05:30
parent 3167c91244
commit eb55a9df52
4 changed files with 20 additions and 10 deletions

View File

@ -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;

View File

@ -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;

View File

@ -1,2 +1 @@
foreign_key : MDEV-7915
binlog_format : MDEV-11532

View File

@ -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)