mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-28124 Server crashes in Explain_aggr_filesort::print_json_members
SHOW EXPLAIN/ANALYZE FORMAT=JSON tries to access items that have already been freed by a call to free_items() during THD::cleanup_after_query(). The solution is to disallow APC calls including SHOW EXPLAIN/ANALYZE just before the call to free_items().
This commit is contained in:
committed by
Sergei Petrunia
parent
a0475cb9ca
commit
02c3babdec
@@ -159,6 +159,16 @@ void Explain_query::query_plan_ready()
|
||||
apc_enabled= true;
|
||||
}
|
||||
|
||||
|
||||
void Explain_query::notify_item_objects_about_to_be_freed()
|
||||
{
|
||||
if (apc_enabled)
|
||||
{
|
||||
thd->apc_target.disable();
|
||||
apc_enabled= false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Send EXPLAIN output to the client.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user