summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/t
diff options
context:
space:
mode:
authorTeemu Ollakka <teemu.ollakka@galeracluster.com>2020-07-23 23:05:47 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2020-07-24 13:26:21 +0300
commit1e2a4ed7ed41f3f6900e164dfad38c95d2af8b7b (patch)
treea3cafce294c5150b70052524bdc13b0855e8a02a /mysql-test/suite/galera/t
parent134a6a8d2f953a5634897b420b1302d32b0e53a7 (diff)
downloadmariadb-git-1e2a4ed7ed41f3f6900e164dfad38c95d2af8b7b.tar.gz
MDEV-21718 Assertion in wsrep::client_state::before_command().
An assertion `server_state_.rollback_mode() == wsrep::server_state::rm_async` fired in before_command() when - thread-handling was set to pool-of-threads and - a BF abort happened between client session calls to wait_rollback_complete_and_acquire_ownership() and before_command(). This commit introduces a test case to reproduce the crash and updates wsrep-lib submodule to fixed version.
Diffstat (limited to 'mysql-test/suite/galera/t')
-rw-r--r--mysql-test/suite/galera/t/mdev_21718.cnf4
-rw-r--r--mysql-test/suite/galera/t/mdev_21718.test33
2 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/t/mdev_21718.cnf b/mysql-test/suite/galera/t/mdev_21718.cnf
new file mode 100644
index 00000000000..9e066597a13
--- /dev/null
+++ b/mysql-test/suite/galera/t/mdev_21718.cnf
@@ -0,0 +1,4 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+thread-handling=pool-of-threads
diff --git a/mysql-test/suite/galera/t/mdev_21718.test b/mysql-test/suite/galera/t/mdev_21718.test
new file mode 100644
index 00000000000..413e9da0e83
--- /dev/null
+++ b/mysql-test/suite/galera/t/mdev_21718.test
@@ -0,0 +1,33 @@
+#
+# MDEV-21718 Reproduce a case where BF abort after
+# client session acquires the ownership but before calls
+# before_command() causes an assertion in wsrep-lib.
+#
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
+
+--let $galera_connection_name = node_1_ctrl
+--let $galera_server_number = 1
+--source include/galera_connect.inc
+
+--connection node_1
+START TRANSACTION;
+INSERT INTO t1 VALUES (1);
+SET DEBUG_SYNC = "wsrep_before_before_command SIGNAL reached WAIT_FOR continue";
+--send COMMIT
+
+--connection node_1_ctrl
+SET DEBUG_SYNC = "now WAIT_FOR reached";
+
+--connection node_2
+INSERT INTO t1 VALUES (1);
+
+# BF abort wakes up node_1 from sync wait.
+--connection node_1
+--error ER_LOCK_DEADLOCK
+--reap
+
+DROP TABLE t1;
+SET DEBUG_SYNC = "RESET";