summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2018-07-13 17:48:30 -0700
committerIgor Babaev <igor@askmonty.org>2018-07-13 17:48:45 -0700
commitc89bb15c31f98d2d368414c7366ce61955b70b44 (patch)
tree9da9ffa67374d46d876491606b3a5f5165637b3b /sql/sql_statistics.h
parentad9d1e8c3f5a8e1b3e222921e825247aa47c4d23 (diff)
downloadmariadb-git-c89bb15c31f98d2d368414c7366ce61955b70b44.tar.gz
MDEV-16757 Memory leak after adding manually min/max statistical data
for blob column ANALYZE TABLE <table> does not collect statistical data on min/max values for BLOB columns of <table>. However these values can be added into mysql.column_stats manually by executing proper statements. Unfortunately this led to a memory leak because the memory allocated for these values was never freed. This patch provides the server with a function to free memory allocated for min/max statistical values of BLOB types.
Diffstat (limited to 'sql/sql_statistics.h')
-rw-r--r--sql/sql_statistics.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_statistics.h b/sql/sql_statistics.h
index 20b2eb66449..6a43e42ab96 100644
--- a/sql/sql_statistics.h
+++ b/sql/sql_statistics.h
@@ -89,6 +89,7 @@ int read_statistics_for_tables_if_needed(THD *thd, TABLE_LIST *tables);
int collect_statistics_for_table(THD *thd, TABLE *table);
int alloc_statistics_for_table_share(THD* thd, TABLE_SHARE *share,
bool is_safe);
+void delete_stat_values_for_table_share(TABLE_SHARE *table_share);
int alloc_statistics_for_table(THD *thd, TABLE *table);
int update_statistics_for_table(THD *thd, TABLE *table);
int delete_statistics_for_table(THD *thd, LEX_STRING *db, LEX_STRING *tab);