Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-35951 : Complete freeze during MW-329 test #3803

Open
wants to merge 1 commit into
base: 10.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions mysql-test/suite/galera/r/MW-329.result
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@ connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
INSERT INTO t1 (f1) VALUES (1),(65535);
CREATE PROCEDURE proc_insert ()
CREATE PROCEDURE proc_insert (repeat_count int)
BEGIN
DECLARE current_num int;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
SET current_num = 0;
SET SESSION wsrep_sync_wait = 0;
WHILE 1 DO
WHILE current_num < repeat_count do
INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 ));
SELECT SLEEP(0.1);
SET current_num = current_num + 1;
END WHILE;
END|
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1b;
connection node_1;
connection node_1b;
connection node_1;
DROP PROCEDURE proc_insert;
DROP TABLE t1;
disconnect node_1b;
CALL mtr.add_suppression("WSREP: .* conflict state after post commit ");
set global innodb_status_output=Default;
25 changes: 12 additions & 13 deletions mysql-test/suite/galera/t/MW-329.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ INSERT INTO t1 (f1) VALUES (1),(65535);
#

DELIMITER |;
CREATE PROCEDURE proc_insert ()
CREATE PROCEDURE proc_insert (repeat_count int)
BEGIN
DECLARE current_num int;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
SET current_num = 0;
SET SESSION wsrep_sync_wait = 0;
WHILE 1 DO
INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 ));
SELECT SLEEP(0.1);
WHILE current_num < repeat_count do
INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 ));
SELECT SLEEP(0.1);
SET current_num = current_num + 1;
END WHILE;
END|
DELIMITER ;|
Expand All @@ -31,15 +34,15 @@ DELIMITER ;|
--let $connection_id = `SELECT CONNECTION_ID()`
--disable_query_log
--disable_result_log
--send CALL proc_insert();
--send CALL proc_insert(500);

#
# Run concurrent UPDATEs. We expect that each UPDATE will report that
# some rows were matched and updated
#

--connection node_2
--let $count = 10
--let $count = 2
--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`

while ($count)
Expand Down Expand Up @@ -78,14 +81,8 @@ while ($count)
--enable_query_log

#
# Terminate the stored procedure
#

--connection node_1
--disable_query_log
--eval KILL CONNECTION $connection_id
--enable_query_log

#
--connection node_1b
--error 0,2013,1317
--reap
Expand All @@ -96,6 +93,8 @@ while ($count)
DROP PROCEDURE proc_insert;
DROP TABLE t1;

--disconnect node_1b

# Due to MW-330, Multiple "conflict state 3 after post commit" warnings if table is dropped while SP is running
CALL mtr.add_suppression("WSREP: .* conflict state after post commit ");

Expand Down