CREATE TABLE t1(id INT PRIMARY KEY, v INT NOT NULL) ENGINE=InnoDB; # Adding debug point 'trx_sys_rw_trx_add_rc' to @@GLOBAL.debug CREATE PROCEDURE create_rw_transactions(k INT) BEGIN WHILE 1 DO START TRANSACTION; UPDATE t1 SET v=v+1 WHERE id=k; COMMIT; END WHILE; END| INSERT INTO t1 (id,v) VALUES (0,0); CALL create_rw_transactions(0); INSERT INTO t1 (id,v) VALUES (1,0); CALL create_rw_transactions(1); INSERT INTO t1 (id,v) VALUES (2,0); CALL create_rw_transactions(2); INSERT INTO t1 (id,v) VALUES (3,0); CALL create_rw_transactions(3); INSERT INTO t1 (id,v) VALUES (4,0); CALL create_rw_transactions(4); INSERT INTO t1 (id,v) VALUES (5,0); CALL create_rw_transactions(5); INSERT INTO t1 (id,v) VALUES (6,0); CALL create_rw_transactions(6); INSERT INTO t1 (id,v) VALUES (7,0); CALL create_rw_transactions(7); INSERT INTO t1 (id,v) VALUES (8,0); CALL create_rw_transactions(8); INSERT INTO t1 (id,v) VALUES (9,0); CALL create_rw_transactions(9); INSERT INTO t1 (id,v) VALUES (10,0); CALL create_rw_transactions(10); INSERT INTO t1 (id,v) VALUES (11,0); CALL create_rw_transactions(11); INSERT INTO t1 (id,v) VALUES (12,0); CALL create_rw_transactions(12); INSERT INTO t1 (id,v) VALUES (13,0); CALL create_rw_transactions(13); INSERT INTO t1 (id,v) VALUES (14,0); CALL create_rw_transactions(14); INSERT INTO t1 (id,v) VALUES (15,0); CALL create_rw_transactions(15); INSERT INTO t1 (id,v) VALUES (16,0); CALL create_rw_transactions(16); INSERT INTO t1 (id,v) VALUES (17,0); CALL create_rw_transactions(17); INSERT INTO t1 (id,v) VALUES (18,0); CALL create_rw_transactions(18); INSERT INTO t1 (id,v) VALUES (19,0); CALL create_rw_transactions(19); INSERT INTO t1 (id,v) VALUES (20,0); CALL create_rw_transactions(20); INSERT INTO t1 (id,v) VALUES (21,0); CALL create_rw_transactions(21); INSERT INTO t1 (id,v) VALUES (22,0); CALL create_rw_transactions(22); INSERT INTO t1 (id,v) VALUES (23,0); CALL create_rw_transactions(23); INSERT INTO t1 (id,v) VALUES (24,0); CALL create_rw_transactions(24); INSERT INTO t1 (id,v) VALUES (25,0); CALL create_rw_transactions(25); INSERT INTO t1 (id,v) VALUES (26,0); CALL create_rw_transactions(26); INSERT INTO t1 (id,v) VALUES (27,0); CALL create_rw_transactions(27); INSERT INTO t1 (id,v) VALUES (28,0); CALL create_rw_transactions(28); INSERT INTO t1 (id,v) VALUES (29,0); CALL create_rw_transactions(29); INSERT INTO t1 (id,v) VALUES (30,0); CALL create_rw_transactions(30); INSERT INTO t1 (id,v) VALUES (31,0); CALL create_rw_transactions(31); INSERT INTO t1 (id,v) VALUES (32,0); CALL create_rw_transactions(32); INSERT INTO t1 (id,v) VALUES (33,0); CALL create_rw_transactions(33); INSERT INTO t1 (id,v) VALUES (34,0); CALL create_rw_transactions(34); INSERT INTO t1 (id,v) VALUES (35,0); CALL create_rw_transactions(35); INSERT INTO t1 (id,v) VALUES (36,0); CALL create_rw_transactions(36); INSERT INTO t1 (id,v) VALUES (37,0); CALL create_rw_transactions(37); INSERT INTO t1 (id,v) VALUES (38,0); CALL create_rw_transactions(38); INSERT INTO t1 (id,v) VALUES (39,0); CALL create_rw_transactions(39); INSERT INTO t1 (id,v) VALUES (40,0); CALL create_rw_transactions(40); INSERT INTO t1 (id,v) VALUES (41,0); CALL create_rw_transactions(41); INSERT INTO t1 (id,v) VALUES (42,0); CALL create_rw_transactions(42); INSERT INTO t1 (id,v) VALUES (43,0); CALL create_rw_transactions(43); INSERT INTO t1 (id,v) VALUES (44,0); CALL create_rw_transactions(44); INSERT INTO t1 (id,v) VALUES (45,0); CALL create_rw_transactions(45); INSERT INTO t1 (id,v) VALUES (46,0); CALL create_rw_transactions(46); INSERT INTO t1 (id,v) VALUES (47,0); CALL create_rw_transactions(47); INSERT INTO t1 (id,v) VALUES (48,0); CALL create_rw_transactions(48); INSERT INTO t1 (id,v) VALUES (49,0); CALL create_rw_transactions(49); INSERT INTO t1 (id,v) VALUES (50,0); CALL create_rw_transactions(50); INSERT INTO t1 (id,v) VALUES (51,0); CALL create_rw_transactions(51); INSERT INTO t1 (id,v) VALUES (52,0); CALL create_rw_transactions(52); INSERT INTO t1 (id,v) VALUES (53,0); CALL create_rw_transactions(53); INSERT INTO t1 (id,v) VALUES (54,0); CALL create_rw_transactions(54); INSERT INTO t1 (id,v) VALUES (55,0); CALL create_rw_transactions(55); INSERT INTO t1 (id,v) VALUES (56,0); CALL create_rw_transactions(56); INSERT INTO t1 (id,v) VALUES (57,0); CALL create_rw_transactions(57); INSERT INTO t1 (id,v) VALUES (58,0); CALL create_rw_transactions(58); INSERT INTO t1 (id,v) VALUES (59,0); CALL create_rw_transactions(59); INSERT INTO t1 (id,v) VALUES (60,0); CALL create_rw_transactions(60); INSERT INTO t1 (id,v) VALUES (61,0); CALL create_rw_transactions(61); INSERT INTO t1 (id,v) VALUES (62,0); CALL create_rw_transactions(62); INSERT INTO t1 (id,v) VALUES (63,0); CALL create_rw_transactions(63); INSERT INTO t1 (id,v) VALUES (64,0); CALL create_rw_transactions(64); INSERT INTO t1 (id,v) VALUES (65,0); CALL create_rw_transactions(65); INSERT INTO t1 (id,v) VALUES (66,0); CALL create_rw_transactions(66); INSERT INTO t1 (id,v) VALUES (67,0); CALL create_rw_transactions(67); INSERT INTO t1 (id,v) VALUES (68,0); CALL create_rw_transactions(68); INSERT INTO t1 (id,v) VALUES (69,0); CALL create_rw_transactions(69); INSERT INTO t1 (id,v) VALUES (70,0); CALL create_rw_transactions(70); INSERT INTO t1 (id,v) VALUES (71,0); CALL create_rw_transactions(71); INSERT INTO t1 (id,v) VALUES (72,0); CALL create_rw_transactions(72); INSERT INTO t1 (id,v) VALUES (73,0); CALL create_rw_transactions(73); INSERT INTO t1 (id,v) VALUES (74,0); CALL create_rw_transactions(74); INSERT INTO t1 (id,v) VALUES (75,0); CALL create_rw_transactions(75); INSERT INTO t1 (id,v) VALUES (76,0); CALL create_rw_transactions(76); INSERT INTO t1 (id,v) VALUES (77,0); CALL create_rw_transactions(77); INSERT INTO t1 (id,v) VALUES (78,0); CALL create_rw_transactions(78); INSERT INTO t1 (id,v) VALUES (79,0); CALL create_rw_transactions(79); INSERT INTO t1 (id,v) VALUES (80,0); CALL create_rw_transactions(80); INSERT INTO t1 (id,v) VALUES (81,0); CALL create_rw_transactions(81); INSERT INTO t1 (id,v) VALUES (82,0); CALL create_rw_transactions(82); INSERT INTO t1 (id,v) VALUES (83,0); CALL create_rw_transactions(83); INSERT INTO t1 (id,v) VALUES (84,0); CALL create_rw_transactions(84); INSERT INTO t1 (id,v) VALUES (85,0); CALL create_rw_transactions(85); INSERT INTO t1 (id,v) VALUES (86,0); CALL create_rw_transactions(86); INSERT INTO t1 (id,v) VALUES (87,0); CALL create_rw_transactions(87); INSERT INTO t1 (id,v) VALUES (88,0); CALL create_rw_transactions(88); INSERT INTO t1 (id,v) VALUES (89,0); CALL create_rw_transactions(89); INSERT INTO t1 (id,v) VALUES (90,0); CALL create_rw_transactions(90); INSERT INTO t1 (id,v) VALUES (91,0); CALL create_rw_transactions(91); INSERT INTO t1 (id,v) VALUES (92,0); CALL create_rw_transactions(92); INSERT INTO t1 (id,v) VALUES (93,0); CALL create_rw_transactions(93); INSERT INTO t1 (id,v) VALUES (94,0); CALL create_rw_transactions(94); INSERT INTO t1 (id,v) VALUES (95,0); CALL create_rw_transactions(95); INSERT INTO t1 (id,v) VALUES (96,0); CALL create_rw_transactions(96); INSERT INTO t1 (id,v) VALUES (97,0); CALL create_rw_transactions(97); INSERT INTO t1 (id,v) VALUES (98,0); CALL create_rw_transactions(98); INSERT INTO t1 (id,v) VALUES (99,0); CALL create_rw_transactions(99); INSERT INTO t1 (id,v) VALUES (100,0); CALL create_rw_transactions(100); INSERT INTO t1 (id,v) VALUES (101,0); CALL create_rw_transactions(101); INSERT INTO t1 (id,v) VALUES (102,0); CALL create_rw_transactions(102); INSERT INTO t1 (id,v) VALUES (103,0); CALL create_rw_transactions(103); INSERT INTO t1 (id,v) VALUES (104,0); CALL create_rw_transactions(104); INSERT INTO t1 (id,v) VALUES (105,0); CALL create_rw_transactions(105); INSERT INTO t1 (id,v) VALUES (106,0); CALL create_rw_transactions(106); INSERT INTO t1 (id,v) VALUES (107,0); CALL create_rw_transactions(107); INSERT INTO t1 (id,v) VALUES (108,0); CALL create_rw_transactions(108); INSERT INTO t1 (id,v) VALUES (109,0); CALL create_rw_transactions(109); INSERT INTO t1 (id,v) VALUES (110,0); CALL create_rw_transactions(110); INSERT INTO t1 (id,v) VALUES (111,0); CALL create_rw_transactions(111); INSERT INTO t1 (id,v) VALUES (112,0); CALL create_rw_transactions(112); INSERT INTO t1 (id,v) VALUES (113,0); CALL create_rw_transactions(113); INSERT INTO t1 (id,v) VALUES (114,0); CALL create_rw_transactions(114); INSERT INTO t1 (id,v) VALUES (115,0); CALL create_rw_transactions(115); INSERT INTO t1 (id,v) VALUES (116,0); CALL create_rw_transactions(116); INSERT INTO t1 (id,v) VALUES (117,0); CALL create_rw_transactions(117); INSERT INTO t1 (id,v) VALUES (118,0); CALL create_rw_transactions(118); INSERT INTO t1 (id,v) VALUES (119,0); CALL create_rw_transactions(119); DROP PROCEDURE create_rw_transactions; DROP TABLE t1; # Removing debug point 'trx_sys_rw_trx_add_rc' from @@GLOBAL.debug