mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-3982: show_explain.test fails, times out or crashes
Backport the fix from 10.0 tree - The problem was that thd_killed() may be called by innodb from an internal innodb thread. - Fixed by not processing APC requests when we're not in the thread that owns the APC target.
This commit is contained in:
@@ -3860,12 +3860,16 @@ void THD::restore_backup_open_tables_state(Open_tables_backup *backup)
|
|||||||
|
|
||||||
extern "C" int thd_killed(const MYSQL_THD thd)
|
extern "C" int thd_killed(const MYSQL_THD thd)
|
||||||
{
|
{
|
||||||
|
THD* current= current_thd;
|
||||||
if (!thd)
|
if (!thd)
|
||||||
thd= current_thd;
|
thd= current_thd;
|
||||||
|
|
||||||
Apc_target *apc_target= (Apc_target*)&thd->apc_target;
|
if (thd == current)
|
||||||
if (apc_target->have_apc_requests())
|
{
|
||||||
apc_target->process_apc_requests();
|
Apc_target *apc_target= (Apc_target*)&thd->apc_target;
|
||||||
|
if (apc_target->have_apc_requests())
|
||||||
|
apc_target->process_apc_requests();
|
||||||
|
}
|
||||||
|
|
||||||
if (!(thd->killed & KILL_HARD_BIT))
|
if (!(thd->killed & KILL_HARD_BIT))
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user