1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Improve reporting from sf_report_leaked_memory()

Other things:
- Added DBUG_EXECUTE_IF("print_allocated_thread_memory") at end of query
  to easier find not freed memory allocated by THD
- Removed free_root() from plugin_init() that did nothing.
This commit is contained in:
Monty
2023-11-26 10:10:37 +02:00
parent 06f7ed4dcd
commit 83214c3406
3 changed files with 10 additions and 5 deletions

View File

@ -2480,6 +2480,8 @@ dispatch_end:
*/
thd->lex->m_sql_cmd= NULL;
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
DBUG_EXECUTE_IF("print_allocated_thread_memory",
SAFEMALLOC_REPORT_MEMORY(sf_malloc_dbug_id()););
#if defined(ENABLED_PROFILING)
thd->profiling.finish_current_query();