1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

BUG#34789 - drop server/create server leaks memory !

When CREATE SERVER is issued, it allocates memory on memory root
to store cached server structure. When DROP SERVER is issued,
it doesn't release this memory, as it is impossible with the
memory root.

We use the same allocation strategy for plugins and acl. The problem
here that there was no way (except for the server restart) to force
'servers' code to release this memory.

With this fix it is possible to release unused server cache memory
by FLUSH PRIVILEGES.

No test case for this fix.
This commit is contained in:
svoj@mysql.com/june.mysql.com
2008-03-20 11:57:30 +04:00
parent 65992efca6
commit 5309d2a521
2 changed files with 7 additions and 3 deletions

View File

@ -6486,6 +6486,8 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
result= 1;
if (grant_reload(thd))
result= 1;
if (servers_reload(thd))
result= 1;
}
if (tmp_thd)
{