List:Internals« Previous MessageNext Message »
From:Rich Prohaska Date:February 16 2014 3:26pm
Subject:memory leak with string thread variables
View as plain text  
hello,

we have a thread variable of type MYSQL_THDVAR_STR and with the
PLUGIN_VAR_MEMALLOC flag set.  this variable gets set by the tokudb
storage  engine with malloc'ed memory.  we expect that the memory will
be freed when the thread context (THD) gets destroyed.  this works
corrected on MariaDB 5.5.35.  unfortunately, the memory for this
variable gets leaked on MySQL 5.5.36 and MySQL 5.6.16 (and probably
other version).

the key difference between MySQL and MariaDB WRT this leak is in the
cleanup_variables function.  MariaDB has code that free's the memory
for these variables while MySQL does not.

is this a bug in MySQL?
Thread
memory leak with string thread variablesRich Prohaska16 Feb 2014