summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2018-09-05 17:14:20 +0400
committerSergey Vojtovich <svoj@mariadb.org>2018-09-05 17:14:20 +0400
commit4cf75706b3893398de515e4ab7b2a95e25cd1a9f (patch)
treef6c151ab5fb5c3d3dac9c8081180aa76865949cb /sql
parent09bc99fac900648ea36b0a0e66fbf191c296a80a (diff)
downloadmariadb-git-4cf75706b3893398de515e4ab7b2a95e25cd1a9f.tar.gz
MDEV-16757 Memory leak after adding manually min/max statistical data
for blob column Moved delete_stat_values_for_table_share() call to proper place.
Diffstat (limited to 'sql')
-rw-r--r--sql/table.cc1
-rw-r--r--sql/table_cache.cc2
2 files changed, 1 insertions, 2 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 86eac73a416..98bf6d8b4dd 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -410,6 +410,7 @@ void TABLE_SHARE::destroy()
ha_share= NULL; // Safety
}
+ delete_stat_values_for_table_share(this);
free_root(&stats_cb.mem_root, MYF(0));
stats_cb.stats_can_be_read= FALSE;
stats_cb.stats_is_read= FALSE;
diff --git a/sql/table_cache.cc b/sql/table_cache.cc
index a31068c9bc3..bdb7914c32b 100644
--- a/sql/table_cache.cc
+++ b/sql/table_cache.cc
@@ -52,7 +52,6 @@
#include "hash.h"
#include "table.h"
#include "sql_base.h"
-#include "sql_statistics.h"
/** Configuration. */
ulong tdc_size; /**< Table definition cache threshold for LRU eviction. */
@@ -870,7 +869,6 @@ void tdc_release_share(TABLE_SHARE *share)
mysql_mutex_lock(&share->tdc.LOCK_table_share);
if (share->tdc.flushed)
{
- delete_stat_values_for_table_share(share);
mysql_mutex_unlock(&share->tdc.LOCK_table_share);
mysql_mutex_unlock(&LOCK_unused_shares);
tdc_delete_share_from_hash(share);