summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/t
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2019-08-12 13:01:33 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2019-08-13 12:52:01 +0300
commit3cee665a0444bd2d0bd881e0e2196d680eb58e64 (patch)
tree2522ac8483906c95436019ed1e467fd19fc3a0be /mysql-test/suite/galera/t
parent609ea2f37b8169a7c282fe2d607c2412467ccbbb (diff)
downloadmariadb-git-3cee665a0444bd2d0bd881e0e2196d680eb58e64.tar.gz
MDEV-17847 Galera test failure on MW-328[A|B|C]
Test changes only.
Diffstat (limited to 'mysql-test/suite/galera/t')
-rw-r--r--mysql-test/suite/galera/t/MW-328-footer.inc2
-rw-r--r--mysql-test/suite/galera/t/MW-328A.test42
-rw-r--r--mysql-test/suite/galera/t/MW-328B.test2
-rw-r--r--mysql-test/suite/galera/t/MW-328C.test3
-rw-r--r--mysql-test/suite/galera/t/MW-328D.test1
-rw-r--r--mysql-test/suite/galera/t/MW-328E.test1
6 files changed, 33 insertions, 18 deletions
diff --git a/mysql-test/suite/galera/t/MW-328-footer.inc b/mysql-test/suite/galera/t/MW-328-footer.inc
index 5b736df220f..12a4bf12590 100644
--- a/mysql-test/suite/galera/t/MW-328-footer.inc
+++ b/mysql-test/suite/galera/t/MW-328-footer.inc
@@ -15,4 +15,4 @@
DROP PROCEDURE proc_update;
DROP TABLE t1, t2;
-CALL mtr.add_suppression("conflict state 3 after post commit");
+CALL mtr.add_suppression("conflict state ABORTED after post commit");
diff --git a/mysql-test/suite/galera/t/MW-328A.test b/mysql-test/suite/galera/t/MW-328A.test
index 09aad1bcf60..da1040b3e5d 100644
--- a/mysql-test/suite/galera/t/MW-328A.test
+++ b/mysql-test/suite/galera/t/MW-328A.test
@@ -3,13 +3,16 @@
#
#
-# Attempt to insert into t2 and check if insert actually inserted rows if
-# a success was reported.
+# test phase 1 is not deterministic
+#
+# Here we attempt to insert into t2 and check if insert actually
+# inserted rows if a success was reported.
+#
+# However, deadlocks may or may not happen in this test execution
+# it all depends on timing.
#
---source include/big_test.inc
--source include/galera_cluster.inc
---source include/have_innodb.inc
--source suite/galera/t/MW-328-header.inc
--connection node_2
@@ -25,7 +28,7 @@ while ($count)
{
TRUNCATE TABLE t2;
- --error 0,1213
+ --error 0,ER_LOCK_DEADLOCK
INSERT IGNORE INTO t2 SELECT f2 FROM t1;
if ($mysql_errno != 1213) {
--inc $successes
@@ -44,14 +47,31 @@ while ($count)
--enable_query_log
+
+--source suite/galera/t/MW-328-footer.inc
+
#
-# Check that the test produced both deadlocks and successes
+# Test phase 2 is deterministic
+# Here we generate a sure conflict in node 1 and verify that
+# insert failed in both nodes
#
+--connection node_1
+CREATE TABLE t1 (i int primary key, j int) engine=innodb;
+INSERT INTO t1 values (1,0);
---disable_query_log
---eval SELECT $successes > 0 AS have_successes
---eval SELECT $deadlocks > 0 AS have_deadlocks
---enable_query_log
+BEGIN;
+UPDATE t1 SET j=1 WHERE i=1;
+--connection node_2
+UPDATE t1 SET j=2 WHERE i=1;
---source suite/galera/t/MW-328-footer.inc
+--connection node_1
+--error ER_LOCK_DEADLOCK
+COMMIT;
+
+SELECT * FROM t1;
+--connection node_2
+SELECT * FROM t1;
+--connection node_1
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MW-328B.test b/mysql-test/suite/galera/t/MW-328B.test
index 000b0d8a9ab..11969dd0b47 100644
--- a/mysql-test/suite/galera/t/MW-328B.test
+++ b/mysql-test/suite/galera/t/MW-328B.test
@@ -7,9 +7,7 @@
# gets the deadlock error
#
---source include/big_test.inc
--source include/galera_cluster.inc
---source include/have_innodb.inc
--source suite/galera/t/MW-328-header.inc
--connection node_2
diff --git a/mysql-test/suite/galera/t/MW-328C.test b/mysql-test/suite/galera/t/MW-328C.test
index 72a8480923c..1594547d0de 100644
--- a/mysql-test/suite/galera/t/MW-328C.test
+++ b/mysql-test/suite/galera/t/MW-328C.test
@@ -7,9 +7,8 @@
# masks all deadlock errors
#
---source include/big_test.inc
--source include/galera_cluster.inc
---source include/have_innodb.inc
+--source include/big_test.inc
--source suite/galera/t/MW-328-header.inc
--connection node_2
diff --git a/mysql-test/suite/galera/t/MW-328D.test b/mysql-test/suite/galera/t/MW-328D.test
index d5cffdb8f47..e8a22f22a99 100644
--- a/mysql-test/suite/galera/t/MW-328D.test
+++ b/mysql-test/suite/galera/t/MW-328D.test
@@ -7,7 +7,6 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
CREATE TABLE t1 (i INT) ENGINE = InnoDB;
INSERT INTO t1 (i) VALUES(1);
diff --git a/mysql-test/suite/galera/t/MW-328E.test b/mysql-test/suite/galera/t/MW-328E.test
index fd4b0bf9039..34b17be7b08 100644
--- a/mysql-test/suite/galera/t/MW-328E.test
+++ b/mysql-test/suite/galera/t/MW-328E.test
@@ -7,7 +7,6 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
create table t1 (i int primary key, j int) engine=innodb;
create table t2 (i int primary key, j int) engine=innodb;