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:
@ -2063,7 +2063,8 @@ void mysqld_show_explain(THD *thd, ulong thread_id)
|
||||
explain_req.target_thd= tmp;
|
||||
explain_req.request_thd= thd;
|
||||
explain_req.failed_to_produce= FALSE;
|
||||
|
||||
|
||||
/* Ok, we have a lock on target->LOCK_thd_data, can call: */
|
||||
bres= tmp->apc_target.make_apc_call(Show_explain_request::get_explain_data,
|
||||
(void*)&explain_req,
|
||||
timeout_sec, &timed_out);
|
||||
@ -2090,7 +2091,7 @@ void mysqld_show_explain(THD *thd, ulong thread_id)
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
|
||||
ER_YES, explain_req.query_str.c_ptr_safe());
|
||||
}
|
||||
mysql_mutex_unlock(&tmp->LOCK_thd_data);
|
||||
//mysql_mutex_unlock(&tmp->LOCK_thd_data);
|
||||
if (!bres)
|
||||
{
|
||||
explain_buf->flush_data();
|
||||
|
Reference in New Issue
Block a user