Commit e180c356 authored by Sachin Setiya's avatar Sachin Setiya

MDEV-12017 Unclear error with flashback: Variable 'binlog_format' can't ...

When WSREP(thd) is not true we will use my_error(...) to print error. This
will set thd->is_error() to true and we wont be getting generic error.
Signed-off-by: default avatarSachin Setiya <sachin.setiya@mariadb.com>
parent a287bfa0
......@@ -502,4 +502,8 @@ a b
2 1
3 2
4 3
SET binlog_format=statement;
ERROR HY000: Flashback does not support binlog_format STATEMENT
SET GLOBAL binlog_format=statement;
ERROR HY000: Flashback does not support binlog_format STATEMENT
DROP TABLE t1;
......@@ -160,4 +160,9 @@ 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;
DROP TABLE t1;
......@@ -7453,3 +7453,5 @@ ER_JSON_PATH_EMPTY
eng "Path expression '$' is not allowed in argument %d to function '%s'."
ER_SLAVE_SAME_ID
eng "A slave with the same server_uuid/server_id as this slave has connected to the master"
ER_FLASHBACK_NOT_SUPPORTED
eng "Flashback does not support %s %s"
......@@ -456,13 +456,13 @@ 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 (var->type == OPT_GLOBAL)
{
WSREP_ERROR("MariaDB Galera and flashback do not support binlog format: %s",
if (WSREP(thd))
WSREP_ERROR("MariaDB Galera does not support binlog format: %s",
binlog_format_names[var->save_result.ulonglong_value]);
return true;
}
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)
......
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