summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/suite/binlog/r/flashback.result5
-rw-r--r--mysql-test/suite/binlog/t/flashback.test4
-rw-r--r--sql/share/errmsg-utf8.txt2
-rw-r--r--sql/sys_vars.cc8
4 files changed, 17 insertions, 2 deletions
diff --git a/mysql-test/suite/binlog/r/flashback.result b/mysql-test/suite/binlog/r/flashback.result
index a7973b36ddd..ae8b583fc7a 100644
--- a/mysql-test/suite/binlog/r/flashback.result
+++ b/mysql-test/suite/binlog/r/flashback.result
@@ -502,4 +502,9 @@ a b
2 1
3 2
4 3
+SET 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;
diff --git a/mysql-test/suite/binlog/t/flashback.test b/mysql-test/suite/binlog/t/flashback.test
index 2f395a2a7b1..8ef38dbcb9f 100644
--- a/mysql-test/suite/binlog/t/flashback.test
+++ b/mysql-test/suite/binlog/t/flashback.test
@@ -160,4 +160,8 @@ let $MYSQLD_DATADIR= `select @@datadir`;
SELECT * FROM t1;
+SET binlog_format=statement;
+--error ER_FLASHBACK_NOT_SUPPORTED
+SET GLOBAL binlog_format=statement;
+
DROP TABLE t1;
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index ae4dc5984bb..f59e85d1be0 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -7450,3 +7450,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"
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index d6b1c76ea00..1462d705fbd 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -459,8 +459,12 @@ static bool binlog_format_check(sys_var *self, THD *thd, set_var *var)
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;
}
}