Skip to content

Commit 942a5a8

Browse files
montywivuvova
authored andcommitted
Report memory leaks from mariadbd if -T or --debug is used
Before memory leaks was only reported if server stopped normally. This made it harder to find out where the leaks happened when debugging test cases.
1 parent 36cdd5c commit 942a5a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/mysqld.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1863,7 +1863,7 @@ static void mysqld_exit(int exit_code)
18631863
{
18641864
fprintf(stderr, "Warning: Memory not freed: %lld\n",
18651865
(longlong) global_status_var.global_memory_used);
1866-
if (exit_code == 0)
1866+
if (exit_code == 0 || opt_endinfo)
18671867
SAFEMALLOC_REPORT_MEMORY(0);
18681868
}
18691869
DBUG_LEAVE;

0 commit comments

Comments
 (0)