From c89bb15c31f98d2d368414c7366ce61955b70b44 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Fri, 13 Jul 2018 17:48:30 -0700 Subject: MDEV-16757 Memory leak after adding manually min/max statistical data for blob column ANALYZE TABLE does not collect statistical data on min/max values for BLOB columns of
. 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. --- sql/sql_statistics.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/sql_statistics.h') 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); -- cgit v1.2.1