diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-06-13 08:57:15 +0300 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-06-13 08:57:15 +0300 |
commit | edc1b8e1172abc35644f2b4824a78d49ac17a7d2 (patch) | |
tree | 6cf43c1625e81926c5806b88cc04acebc929cd80 | |
parent | cec2219cc54008e18bf112877bd239c885020e4a (diff) | |
download | mariadb-git-edc1b8e1172abc35644f2b4824a78d49ac17a7d2.tar.gz |
Fix wsrep.variables test case
Correctly port 09b25f85966f44aae933e86b84b4ebe59ded47c3 from 10.0.
Expose check_is_super via include file to allow wsrep_on_check to use
it.
-rw-r--r-- | sql/set_var.h | 1 | ||||
-rw-r--r-- | sql/sys_vars.cc | 2 | ||||
-rw-r--r-- | sql/wsrep_var.cc | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index fe66eaff775..203969d6169 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -426,6 +426,7 @@ CHARSET_INFO *get_old_charset_by_name(const char *old_name); int sys_var_init(); int sys_var_add_options(DYNAMIC_ARRAY *long_options, int parse_flags); void sys_var_end(void); +bool check_has_super(sys_var *self, THD *thd, set_var *var); #endif diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 9f87d66fef1..5470acc7892 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -428,7 +428,7 @@ error_if_in_trans_or_substatement(THD *thd, int in_substatement_error, return false; } -static bool check_has_super(sys_var *self, THD *thd, set_var *var) +bool check_has_super(sys_var *self, THD *thd, set_var *var) { DBUG_ASSERT(self->scope() != sys_var::GLOBAL);// don't abuse check_has_super() #ifndef NO_EMBEDDED_ACCESS_CHECKS diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index 2d52396331d..216bab0cdcd 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -69,6 +69,9 @@ bool wsrep_on_check(sys_var *self, THD* thd, set_var* var) { bool new_wsrep_on= (bool)var->save_result.ulonglong_value; + if (check_has_super(self, thd, var)) + return true; + if (new_wsrep_on && innodb_lock_schedule_algorithm != 0) { my_message(ER_WRONG_ARGUMENTS, " WSREP (galera) can't be enabled " "if innodb_lock_schedule_algorithm=VATS. Please configure" |