← Back to team overview

maria-developers team mailing list archive

Please review patch for 12017 and 12018.

 

Hi Monty!,

Please review patch for 12017 and 12018 . this patch solves both the problem.


-- 
Regards
Sachin Setiya
Software Engineer at  MariaDB
commit 088c88957c17de004384579d60a72ae97d09fc59
Author: Sachin Setiya <sachin.setiya@xxxxxxxxxxx>
Date:   Fri Apr 7 19:05:31 2017 +0530

    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.

diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index ae4dc59..6f36a1f 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 do not support %s %s"
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index d6b1c76..d906118 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -459,9 +459,18 @@ 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]);
-      return true;
+        if (WSREP(thd))
+        {
+          WSREP_ERROR("MariaDB Galera do 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;
+        }
     }
   }
 

Follow ups