Commit 8ce7d721 authored by Sergey Petrunya's avatar Sergey Petrunya

MDEV-4753: partition_innodb_stmt reports memory leaks from dict/dict0stats_bg.cc:69

- Work around the problem by forcing recalc_pool to free its buffer
  in dict_stats_recalc_pool_deinit().
parent c7020dfd
......@@ -78,6 +78,16 @@ dict_stats_recalc_pool_deinit()
ut_ad(!srv_read_only_mode);
recalc_pool.clear();
/*
recalc_pool may still have its buffer allocated. It will free it when
its destructor is called.
The problem is, memory leak detector is run before the recalc_pool's
destructor is invoked, and will report recalc_pool's buffer as leaked
memory. To avoid that, we force recalc_pool to surrender its buffer
to empty_pool object, which will free it when leaving this function:
*/
recalc_pool_t empty_pool;
recalc_pool.swap(empty_pool);
}
/*****************************************************************//**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment