mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 22:34:18 +01:00
16ec25c0a8
Before this patch, semisync assumed transactions running in parallel can not be larger than max_connections, but this is not true when the event scheduler is executing events, and cause semisync run out of preallocated transaction nodes. Fix the problem by allocating transaction nodes dynamically. This patch also fixed a possible deadlock when running UNINSTALL PLUGIN rpl_semi_sync_master and updating in parallel. Fixed by releasing the internal Delegate lock before unlock the plugins.
46 lines
2.1 KiB
Text
46 lines
2.1 KiB
Text
stop slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
reset master;
|
|
reset slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
start slave;
|
|
include/stop_slave.inc
|
|
include/start_slave.inc
|
|
SET GLOBAL event_scheduler = ON;
|
|
CREATE TABLE t1 (i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f varchar(8)) ENGINE=ENGINE_TYPE;
|
|
INSERT INTO t1 (f) VALUES ('a'),('a'),('a'),('a'),('a');
|
|
INSERT INTO t1 SELECT i+5, f FROM t1;
|
|
INSERT INTO t1 SELECT i+10, f FROM t1;
|
|
CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND
|
|
DO INSERT INTO t1 VALUES (SLEEP(5),CONCAT('ev1_',CONNECTION_ID()));
|
|
CREATE EVENT ev2 ON SCHEDULE EVERY 1 SECOND
|
|
DO INSERT INTO t1 VALUES (SLEEP(5),CONCAT('ev2_',CONNECTION_ID()));
|
|
STOP SLAVE IO_THREAD;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 20;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 19;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 18;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 17;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 16;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 15;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 14;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 13;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 12;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 11;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 10;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 9;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 8;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 7;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 6;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 5;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 4;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 3;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 2;
|
|
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 1;
|
|
SET GLOBAL event_scheduler = OFF;
|
|
include/stop_slave.inc
|
|
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
|
UNINSTALL PLUGIN rpl_semi_sync_master;
|
|
include/start_slave.inc
|
|
DROP EVENT ev1;
|
|
DROP EVENT ev2;
|
|
DROP TABLE t1;
|