1SET @innodb_show_verbose_locks_save = @@global.innodb_show_verbose_locks;
2SET @innodb_show_locks_held_save = @@global.innodb_show_locks_held;
3SET @innodb_status_output_locks_save = @@global.innodb_status_output_locks;
4CREATE TABLE t (id INT PRIMARY KEY, value INT NOT NULL DEFAULT 0) ENGINE=InnoDB;
5INSERT INTO t(id) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
6SET GLOBAL innodb_show_verbose_locks = 0;
7START TRANSACTION;
8UPDATE t SET value = 1 WHERE id = 3;
9connection con1
10SET innodb_lock_wait_timeout = 1073741824;
11START TRANSACTION;
12UPDATE t SET value = 1 WHERE id = 3;
13connection default
14"Record lock" not found
15ROLLBACK;
16connection con1
17ROLLBACK;
18connection default
19SET GLOBAL innodb_show_verbose_locks = 1;
20START TRANSACTION;
21UPDATE t SET value = 1 WHERE id = 3;
22connection con1
23SET innodb_lock_wait_timeout = 1073741824;
24START TRANSACTION;
25UPDATE t SET value = 1 WHERE id = 3;
26connection default
27"Record lock" found
28n = 4
29ROLLBACK;
30connection con1
31ROLLBACK;
32connection default
33SET GLOBAL innodb_status_output_locks = ON;
34START TRANSACTION;
35UPDATE t SET value = 1 WHERE id = 3;
36connection con1
37SET innodb_lock_wait_timeout = 1073741824;
38START TRANSACTION;
39UPDATE t SET value = 1 WHERE id = 3;
40connection default
41"Record lock" found
42n = 12
43ROLLBACK;
44connection con1
45ROLLBACK;
46connection default
47SET GLOBAL innodb_show_locks_held = 1;
48START TRANSACTION;
49UPDATE t SET value = 1 WHERE id = 3;
50connection con1
51SET innodb_lock_wait_timeout = 1073741824;
52START TRANSACTION;
53UPDATE t SET value = 1 WHERE id = 3;
54connection default
55"Record lock" found
56n = 4
57too many locks printed
58ROLLBACK;
59connection con1
60ROLLBACK;
61connection default
62SET GLOBAL innodb_show_locks_held = 0;
63START TRANSACTION;
64UPDATE t SET value = 1 WHERE id = 3;
65connection con1
66SET innodb_lock_wait_timeout = 1073741824;
67START TRANSACTION;
68UPDATE t SET value = 1 WHERE id = 3;
69connection default
70"Record lock" found
71n = 4
72ROLLBACK;
73connection con1
74ROLLBACK;
75connection default
76SET GLOBAL innodb_show_verbose_locks = @innodb_show_verbose_locks_save;
77SET GLOBAL innodb_show_locks_held = @innodb_show_locks_held_save;
78SET GLOBAL innodb_status_output_locks = @innodb_status_output_locks_save;
79DROP TABLE t;
80#
81# Bug 1586262: "Buffer pool size, bytes" always 0 in InnoDB status
82#
83mysql -e "SHOW ENGINE INNODB STATUS"
84Grepping InnoDB status for Buffer pool size, bytes 25149440
85#
86# PS-6150: MySQL crash - sync_mutex_to_string
87#
88CREATE TABLE t1(id INT(15) NOT NULL AUTO_INCREMENT, a INT, PRIMARY KEY(id)) ENGINE=InnoDB;
89SET DEBUG_SYNC='innobase_lock_autoinc SIGNAL autoinc_lock.locked WAIT_FOR autoinc_lock.continue';
90INSERT INTO test.t1(a) VALUES(1);
91SET DEBUG_SYNC='now WAIT_FOR autoinc_lock.locked';
92SET SESSION debug="+d,catch_autoinc_mutex_os_lock";
93SET DEBUG_SYNC='autoinc_mutex_wait SIGNAL autoinc_mutex_wait.locked';
94INSERT INTO test.t1(a) VALUES(1);
95SET DEBUG_SYNC='now WAIT_FOR autoinc_mutex_wait.locked';
96SHOW ENGINE INNODB STATUS;
97SET DEBUG_SYNC='now SIGNAL autoinc_lock.continue';
98SET SESSION debug="-d,catch_autoinc_mutex_os_lock";
99DROP TABLE t1;
100SET DEBUG_SYNC = 'RESET';
101