mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-297: SHOW EXPLAIN: Server gets stuck until timeout occurs while executing SHOW
INDEX and SHOW EXPLAIN in parallel - Rework locking code to use the LOCK_thd_data mutex for all synchronization. This also fixed MDEV-301.
This commit is contained in:
@ -596,4 +596,24 @@ count(*)
|
||||
212
|
||||
set debug_dbug='';
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-297: SHOW EXPLAIN: Server gets stuck until timeout occurs while
|
||||
# executing SHOW INDEX and SHOW EXPLAIN in parallel
|
||||
#
|
||||
CREATE TABLE t1(a INT, b INT, c INT, KEY(a), KEY(b), KEY(c));
|
||||
INSERT INTO t1 (a) VALUES (3),(1),(5),(1);
|
||||
set @show_explain_probe_select_id=1;
|
||||
set debug_dbug='d,show_explain_probe_join_exec_start';
|
||||
SHOW INDEX FROM t1;
|
||||
show explain for $thr2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE STATISTICS ALL NULL NULL NULL NULL NULL Skip_open_table; Scanned all databases
|
||||
Warnings:
|
||||
Note 1003 SHOW INDEX FROM t1
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
|
||||
t1 1 a 1 a A NULL NULL NULL YES BTREE
|
||||
t1 1 b 1 b A NULL NULL NULL YES BTREE
|
||||
t1 1 c 1 c A NULL NULL NULL YES BTREE
|
||||
set debug_dbug='';
|
||||
DROP TABLE t1;
|
||||
drop table t0;
|
||||
|
@ -581,6 +581,26 @@ reap;
|
||||
set debug_dbug='';
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-297: SHOW EXPLAIN: Server gets stuck until timeout occurs while
|
||||
--echo # executing SHOW INDEX and SHOW EXPLAIN in parallel
|
||||
--echo #
|
||||
CREATE TABLE t1(a INT, b INT, c INT, KEY(a), KEY(b), KEY(c));
|
||||
INSERT INTO t1 (a) VALUES (3),(1),(5),(1);
|
||||
|
||||
set @show_explain_probe_select_id=1;
|
||||
set debug_dbug='d,show_explain_probe_join_exec_start';
|
||||
|
||||
send SHOW INDEX FROM t1;
|
||||
connection default;
|
||||
--source include/wait_condition.inc
|
||||
evalp show explain for $thr2;
|
||||
connection con1;
|
||||
reap;
|
||||
set debug_dbug='';
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
## TODO: Test this: have several SHOW EXPLAIN requests be queued up for a
|
||||
## thread and served together.
|
||||
|
Reference in New Issue
Block a user