MDEV-22666 : galera.MW-328A MTR failed: "Semaphore wait has lasted > 600 seconds" and do not release port 16002
Removed bad tests.
This commit is contained in:
parent
c796c26640
commit
836a352b86
@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
GCF-1081 : MDEV-18283 Galera test failure on galera.GCF-1081
|
GCF-1081 : MDEV-18283 Galera test failure on galera.GCF-1081
|
||||||
GCF-939 : MDEV-21520 galera.GCF-939
|
GCF-939 : MDEV-21520 galera.GCF-939
|
||||||
MW-328A : MDEV-22666 galera.MW-328A MTR failed: "Semaphore wait has lasted > 600 seconds" and do not release port 16002
|
|
||||||
MW-328B : MDEV-22666 galera.MW-328A MTR failed: "Semaphore wait has lasted > 600 seconds" and do not release port 16002
|
|
||||||
MW-329 : MDEV-19962 Galera test failure on MW-329
|
MW-329 : MDEV-19962 Galera test failure on MW-329
|
||||||
galera_as_slave_ctas : MDEV-28378 timeout
|
galera_as_slave_ctas : MDEV-28378 timeout
|
||||||
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
|
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
connection node_2;
|
|
||||||
connection node_1;
|
|
||||||
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
|
|
||||||
INSERT INTO t1 (f1) VALUES (1);
|
|
||||||
CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
|
|
||||||
CREATE PROCEDURE proc_update ()
|
|
||||||
BEGIN
|
|
||||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
|
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
|
||||||
WHILE 1 DO
|
|
||||||
UPDATE t1 SET f2 = LEFT(MD5(RAND()), 4);
|
|
||||||
END WHILE;
|
|
||||||
END|
|
|
||||||
connect node_1X, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
|
||||||
connection node_1X;
|
|
||||||
CALL proc_update();;
|
|
||||||
connection node_1;
|
|
||||||
call mtr.add_suppression("WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position");
|
|
||||||
connection node_2;
|
|
||||||
call mtr.add_suppression("WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position");
|
|
||||||
SET SESSION wsrep_retry_autocommit = 0;
|
|
||||||
connection node_1;
|
|
||||||
connection node_1X;
|
|
||||||
Got one of the listed errors
|
|
||||||
connection node_1;
|
|
||||||
DROP PROCEDURE proc_update;
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
CALL mtr.add_suppression("conflict state ABORTED after post commit");
|
|
||||||
connection node_1;
|
|
||||||
CREATE TABLE t1 (i int primary key, j int) engine=innodb;
|
|
||||||
INSERT INTO t1 values (1,0);
|
|
||||||
BEGIN;
|
|
||||||
UPDATE t1 SET j=1 WHERE i=1;
|
|
||||||
connection node_2;
|
|
||||||
UPDATE t1 SET j=2 WHERE i=1;
|
|
||||||
connection node_1;
|
|
||||||
COMMIT;
|
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
|
||||||
SELECT * FROM t1;
|
|
||||||
i j
|
|
||||||
1 2
|
|
||||||
connection node_2;
|
|
||||||
SELECT * FROM t1;
|
|
||||||
i j
|
|
||||||
1 2
|
|
||||||
connection node_1;
|
|
||||||
DROP TABLE t1;
|
|
@ -1,25 +0,0 @@
|
|||||||
connection node_2;
|
|
||||||
connection node_1;
|
|
||||||
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
|
|
||||||
INSERT INTO t1 (f1) VALUES (1);
|
|
||||||
CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
|
|
||||||
CREATE PROCEDURE proc_update ()
|
|
||||||
BEGIN
|
|
||||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
|
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
|
||||||
WHILE 1 DO
|
|
||||||
UPDATE t1 SET f2 = LEFT(MD5(RAND()), 4);
|
|
||||||
END WHILE;
|
|
||||||
END|
|
|
||||||
connect node_1X, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
|
||||||
connection node_1X;
|
|
||||||
CALL proc_update();;
|
|
||||||
connection node_2;
|
|
||||||
SET SESSION wsrep_retry_autocommit = 0;
|
|
||||||
connection node_1;
|
|
||||||
connection node_1X;
|
|
||||||
Got one of the listed errors
|
|
||||||
connection node_1;
|
|
||||||
DROP PROCEDURE proc_update;
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
CALL mtr.add_suppression("conflict state ABORTED after post commit");
|
|
@ -1,22 +0,0 @@
|
|||||||
connection node_2;
|
|
||||||
connection node_1;
|
|
||||||
CREATE TABLE t1 (i INT) ENGINE = InnoDB;
|
|
||||||
INSERT INTO t1 (i) VALUES(1);
|
|
||||||
CREATE TABLE t2 (i INT) ENGINE = InnoDB;
|
|
||||||
connection node_1;
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
SELECT * FROM t1 WHERE i = 1 LOCK IN SHARE MODE;
|
|
||||||
i
|
|
||||||
1
|
|
||||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
|
||||||
connection node_1a;
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT IGNORE INTO t2 SELECT * FROM t1 WHERE i = 1 FOR UPDATE;;
|
|
||||||
connection node_1;
|
|
||||||
DELETE FROM t1 WHERE i = 1;
|
|
||||||
COMMIT;
|
|
||||||
connection node_1a;
|
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
|
||||||
DROP TABLE t1, t2;
|
|
@ -1,22 +0,0 @@
|
|||||||
connection node_2;
|
|
||||||
connection node_1;
|
|
||||||
create table t1 (i int primary key, j int) engine=innodb;
|
|
||||||
create table t2 (i int primary key, j int) engine=innodb;
|
|
||||||
insert into t1 values (1,0);
|
|
||||||
insert into t2 values (2,0);
|
|
||||||
set autocommit=off;
|
|
||||||
start transaction;
|
|
||||||
update t1 set j=1 where i=1;
|
|
||||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
|
||||||
connection node_1a;
|
|
||||||
set autocommit=off;
|
|
||||||
start transaction;
|
|
||||||
begin;
|
|
||||||
update t2 set j=1 where i=2;
|
|
||||||
connection node_1;
|
|
||||||
insert into t1 select * from t2;;
|
|
||||||
connection node_1a;
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
|
||||||
connection node_1;
|
|
||||||
DROP TABLE t1, t2;
|
|
@ -1,18 +0,0 @@
|
|||||||
#
|
|
||||||
# Cleanup for MW-328 tests
|
|
||||||
#
|
|
||||||
|
|
||||||
--connection node_1
|
|
||||||
--disable_query_log
|
|
||||||
--eval KILL CONNECTION $sp_connection_id
|
|
||||||
--enable_query_log
|
|
||||||
|
|
||||||
--connection node_1X
|
|
||||||
--error 2013,1317
|
|
||||||
--reap
|
|
||||||
|
|
||||||
--connection node_1
|
|
||||||
DROP PROCEDURE proc_update;
|
|
||||||
DROP TABLE t1, t2;
|
|
||||||
|
|
||||||
CALL mtr.add_suppression("conflict state ABORTED after post commit");
|
|
@ -1,29 +0,0 @@
|
|||||||
#
|
|
||||||
# Initialization for MW-328 tests
|
|
||||||
#
|
|
||||||
|
|
||||||
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
|
|
||||||
INSERT INTO t1 (f1) VALUES (1);
|
|
||||||
|
|
||||||
CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
|
|
||||||
|
|
||||||
#
|
|
||||||
# Have some random updates going on against t1
|
|
||||||
#
|
|
||||||
|
|
||||||
DELIMITER |;
|
|
||||||
CREATE PROCEDURE proc_update ()
|
|
||||||
BEGIN
|
|
||||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
|
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
|
||||||
WHILE 1 DO
|
|
||||||
UPDATE t1 SET f2 = LEFT(MD5(RAND()), 4);
|
|
||||||
END WHILE;
|
|
||||||
END|
|
|
||||||
|
|
||||||
DELIMITER ;|
|
|
||||||
|
|
||||||
--connect node_1X, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
|
||||||
--connection node_1X
|
|
||||||
--let $sp_connection_id = `SELECT CONNECTION_ID()`
|
|
||||||
--send CALL proc_update();
|
|
@ -1,7 +0,0 @@
|
|||||||
!include ../galera_2nodes.cnf
|
|
||||||
|
|
||||||
[mysqld.1]
|
|
||||||
wsrep-debug=SERVER
|
|
||||||
|
|
||||||
[mysqld.2]
|
|
||||||
wsrep-debug=SERVER
|
|
@ -1,82 +0,0 @@
|
|||||||
#
|
|
||||||
# MW-328 Fix unnecessary/silent BF aborts
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# 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/galera_cluster.inc
|
|
||||||
--source include/force_restart.inc
|
|
||||||
--source suite/galera/t/MW-328-header.inc
|
|
||||||
|
|
||||||
--connection node_1
|
|
||||||
call mtr.add_suppression("WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position");
|
|
||||||
|
|
||||||
--connection node_2
|
|
||||||
call mtr.add_suppression("WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position");
|
|
||||||
--let $count = 100
|
|
||||||
--let $successes = 0
|
|
||||||
--let $deadlocks = 0
|
|
||||||
|
|
||||||
SET SESSION wsrep_retry_autocommit = 0;
|
|
||||||
|
|
||||||
--disable_query_log
|
|
||||||
|
|
||||||
while ($count)
|
|
||||||
{
|
|
||||||
TRUNCATE TABLE t2;
|
|
||||||
|
|
||||||
--error 0,ER_LOCK_DEADLOCK
|
|
||||||
INSERT IGNORE INTO t2 SELECT f2 FROM t1;
|
|
||||||
if ($mysql_errno != 1213) {
|
|
||||||
--inc $successes
|
|
||||||
if (`SELECT COUNT(*) = 0 FROM t2`) {
|
|
||||||
--die No rows arrived in table t2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($mysql_errno == 1213) {
|
|
||||||
--inc $deadlocks
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
--dec $count
|
|
||||||
}
|
|
||||||
|
|
||||||
--enable_query_log
|
|
||||||
|
|
||||||
|
|
||||||
--source suite/galera/t/MW-328-footer.inc
|
|
||||||
|
|
||||||
#
|
|
||||||
# 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);
|
|
||||||
|
|
||||||
BEGIN;
|
|
||||||
UPDATE t1 SET j=1 WHERE i=1;
|
|
||||||
|
|
||||||
--connection node_2
|
|
||||||
UPDATE t1 SET j=2 WHERE i=1;
|
|
||||||
|
|
||||||
--connection node_1
|
|
||||||
--error ER_LOCK_DEADLOCK
|
|
||||||
COMMIT;
|
|
||||||
|
|
||||||
SELECT * FROM t1;
|
|
||||||
--connection node_2
|
|
||||||
SELECT * FROM t1;
|
|
||||||
--connection node_1
|
|
||||||
|
|
||||||
DROP TABLE t1;
|
|
@ -1,7 +0,0 @@
|
|||||||
!include ../galera_2nodes.cnf
|
|
||||||
|
|
||||||
[mysqld.1]
|
|
||||||
wsrep-debug=SERVER
|
|
||||||
|
|
||||||
[mysqld.2]
|
|
||||||
wsrep-debug=SERVER
|
|
@ -1,36 +0,0 @@
|
|||||||
#
|
|
||||||
# MW-328 Fix unnecessary/silent BF aborts
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# Make sure an unrelated SELECT following a BF-aborted query never
|
|
||||||
# gets the deadlock error
|
|
||||||
#
|
|
||||||
|
|
||||||
--source include/galera_cluster.inc
|
|
||||||
--source include/force_restart.inc
|
|
||||||
--source suite/galera/t/MW-328-header.inc
|
|
||||||
|
|
||||||
--connection node_2
|
|
||||||
--let $count = 100
|
|
||||||
|
|
||||||
SET SESSION wsrep_retry_autocommit = 0;
|
|
||||||
|
|
||||||
--disable_query_log
|
|
||||||
|
|
||||||
while ($count)
|
|
||||||
{
|
|
||||||
--error 0,1213
|
|
||||||
INSERT IGNORE INTO t2 SELECT f2 FROM t1;
|
|
||||||
|
|
||||||
--disable_result_log
|
|
||||||
--error 0
|
|
||||||
SELECT 1 FROM DUAL;
|
|
||||||
--enable_result_log
|
|
||||||
|
|
||||||
--dec $count
|
|
||||||
}
|
|
||||||
|
|
||||||
--enable_query_log
|
|
||||||
|
|
||||||
--source suite/galera/t/MW-328-footer.inc
|
|
@ -1,7 +0,0 @@
|
|||||||
!include ../galera_2nodes.cnf
|
|
||||||
|
|
||||||
[mysqld.1]
|
|
||||||
wsrep-debug=SERVER
|
|
||||||
|
|
||||||
[mysqld.2]
|
|
||||||
wsrep-debug=SERVER
|
|
@ -1,39 +0,0 @@
|
|||||||
#
|
|
||||||
# MW-328 Fix unnecessary/silent BF aborts
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# Test that non-Galera deadlock error still behaves as expected
|
|
||||||
#
|
|
||||||
|
|
||||||
--source include/galera_cluster.inc
|
|
||||||
|
|
||||||
CREATE TABLE t1 (i INT) ENGINE = InnoDB;
|
|
||||||
INSERT INTO t1 (i) VALUES(1);
|
|
||||||
|
|
||||||
CREATE TABLE t2 (i INT) ENGINE = InnoDB;
|
|
||||||
|
|
||||||
# Create a deadlock situation
|
|
||||||
|
|
||||||
--connection node_1
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
SELECT * FROM t1 WHERE i = 1 LOCK IN SHARE MODE;
|
|
||||||
|
|
||||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
|
||||||
--connection node_1a
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
--send INSERT IGNORE INTO t2 SELECT * FROM t1 WHERE i = 1 FOR UPDATE;
|
|
||||||
|
|
||||||
--connection node_1
|
|
||||||
--sleep 2
|
|
||||||
DELETE FROM t1 WHERE i = 1;
|
|
||||||
COMMIT;
|
|
||||||
|
|
||||||
# We expect that ER_LOCK_DEADLOCK will be delivered even though it was a INSERT INGORE statement
|
|
||||||
--connection node_1a
|
|
||||||
--error ER_LOCK_DEADLOCK
|
|
||||||
--reap
|
|
||||||
|
|
||||||
DROP TABLE t1, t2;
|
|
@ -1,7 +0,0 @@
|
|||||||
!include ../galera_2nodes.cnf
|
|
||||||
|
|
||||||
[mysqld.1]
|
|
||||||
wsrep-debug=SERVER
|
|
||||||
|
|
||||||
[mysqld.2]
|
|
||||||
wsrep-debug=SERVER
|
|
@ -1,40 +0,0 @@
|
|||||||
#
|
|
||||||
# MW-328 Fix unnecessary/silent BF aborts
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# Test that non-Galera deadlock error still behaves as expected (case #2)
|
|
||||||
#
|
|
||||||
|
|
||||||
--source include/galera_cluster.inc
|
|
||||||
|
|
||||||
create table t1 (i int primary key, j int) engine=innodb;
|
|
||||||
create table t2 (i int primary key, j int) engine=innodb;
|
|
||||||
|
|
||||||
insert into t1 values (1,0);
|
|
||||||
insert into t2 values (2,0);
|
|
||||||
|
|
||||||
set autocommit=off;
|
|
||||||
start transaction;
|
|
||||||
update t1 set j=1 where i=1;
|
|
||||||
|
|
||||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
|
||||||
--connection node_1a
|
|
||||||
set autocommit=off;
|
|
||||||
start transaction;
|
|
||||||
begin;
|
|
||||||
update t2 set j=1 where i=2;
|
|
||||||
|
|
||||||
--connection node_1
|
|
||||||
# Hang expected here
|
|
||||||
--send insert into t1 select * from t2;
|
|
||||||
|
|
||||||
--sleep 2
|
|
||||||
--connection node_1a
|
|
||||||
--error ER_LOCK_DEADLOCK
|
|
||||||
insert into t2 select * from t1;
|
|
||||||
|
|
||||||
--connection node_1
|
|
||||||
--reap
|
|
||||||
|
|
||||||
DROP TABLE t1, t2;
|
|
Loading…
x
Reference in New Issue
Block a user