Fix parent memory tracker during query detaching

This commit is contained in:
Azat Khuzhin 2020-10-22 23:00:51 +03:00
parent 114ea9b1eb
commit 0cccf3049a

View File

@ -301,7 +301,7 @@ void ThreadStatus::detachQuery(bool exit_if_already_detached, bool thread_exits)
memory_tracker.reset(); memory_tracker.reset();
/// Must reset pointer to thread_group's memory_tracker, because it will be destroyed two lines below. /// Must reset pointer to thread_group's memory_tracker, because it will be destroyed two lines below.
memory_tracker.setParent(nullptr); memory_tracker.setParent(thread_group->memory_tracker.getParent());
query_id.clear(); query_id.clear();
query_context = nullptr; query_context = nullptr;