summaryrefslogtreecommitdiff
path: root/sql/wsrep_var.cc
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2017-12-09 11:20:46 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2017-12-09 11:20:46 +0200
commite66bb5726716b7852c880e02b0acf0f5b9a1e8ee (patch)
treea2b97972b492a3e3aab580679951e289196cdf58 /sql/wsrep_var.cc
parent1374f958c120ee0fdf3f4b017f1289aba87dae07 (diff)
downloadmariadb-git-e66bb5726716b7852c880e02b0acf0f5b9a1e8ee.tar.gz
MDEV-12837: WSREP: BF lock wait long
This is 10.1 version where no merge error exists. wsrep_on_check New check function. Galera can't be enabled if innodb-lock-schedule-algorithm=VATS. innobase_kill_query In Galera async kill we could own lock mutex. innobase_init If Variance-Aware-Transaction-Sheduling Algorithm (VATS) is used on Galera we refuse to start InnoDB. Changed innodb-lock-schedule-algorithm as read-only parameter as it was designed to be. lock_rec_other_has_expl_req, lock_rec_other_has_conflicting, lock_rec_lock_slow lock_table_other_has_incompatible lock_rec_insert_check_and_lock Change pointer to conflicting lock to normal pointer as this pointer contents could be changed later.
Diffstat (limited to 'sql/wsrep_var.cc')
-rw-r--r--sql/wsrep_var.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc
index b21041eb0f8..ad1f4ec0eac 100644
--- a/sql/wsrep_var.cc
+++ b/sql/wsrep_var.cc
@@ -52,12 +52,28 @@ int wsrep_init_vars()
return 0;
}
+extern ulong innodb_lock_schedule_algorithm;
+
bool wsrep_on_update (sys_var *self, THD* thd, enum_var_type var_type)
{
if (var_type == OPT_GLOBAL) {
// FIXME: this variable probably should be changed only per session
thd->variables.wsrep_on = global_system_variables.wsrep_on;
}
+
+ return false;
+}
+
+bool wsrep_on_check(sys_var *self, THD* thd, set_var* var)
+{
+ bool new_wsrep_on= (bool)var->save_result.ulonglong_value;
+
+ 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"
+ " innodb_lock_schedule_algorithm=FCFS and restart.", MYF(0));
+ return true;
+ }
return false;
}