maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #12372
Re: 23814b75241: Report memory leaks from mariadbd if -T or --debug is used
Hi, Michael!
ok to push, of course
On Sep 08, Michael Widenius wrote:
> revision-id: 23814b75241 (mariadb-10.5.2-273-g23814b75241)
> parent(s): 099596296ce
> author: Michael Widenius <michael.widenius@xxxxxxxxx>
> committer: Michael Widenius <michael.widenius@xxxxxxxxx>
> timestamp: 2020-09-03 15:17:56 +0300
> message:
>
> 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.
>
> diff --git a/sql/mysqld.cc b/sql/mysqld.cc
> index 331684ff728..7468f436a03 100644
> --- a/sql/mysqld.cc
> +++ b/sql/mysqld.cc
> @@ -1939,7 +1939,7 @@ static void mysqld_exit(int exit_code)
> {
> fprintf(stderr, "Warning: Memory not freed: %lld\n",
> (longlong) global_status_var.global_memory_used);
> - if (exit_code == 0)
> + if (exit_code == 0 || opt_endinfo)
> SAFEMALLOC_REPORT_MEMORY(0);
> }
> DBUG_LEAVE;
>
Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx