1
0
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:
Sergey Petrunya
2012-06-07 12:19:06 +04:00
parent 9a7b3bf4b7
commit 2c1e737c6c
6 changed files with 119 additions and 78 deletions

View File

@ -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.