diff options
author | Igor Babaev <igor@askmonty.org> | 2018-07-15 16:24:24 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2018-07-15 16:24:24 -0700 |
commit | 095dc81158902380b8618338efabb5ce480dbd79 (patch) | |
tree | 9c9e5196aa79a166934490a051534aee6718a9f6 /sql/sql_statistics.h | |
parent | 1d10c9afe0f2f4fba73892e6c12ea6efe90d5931 (diff) | |
download | mariadb-git-095dc81158902380b8618338efabb5ce480dbd79.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.
Temporarily changed the test case until MDEV-16711 is fixed as without
this fix the test case for MDEV-16757 did not fail only for 10.0.
Diffstat (limited to 'sql/sql_statistics.h')
-rw-r--r-- | sql/sql_statistics.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_statistics.h b/sql/sql_statistics.h index f46583839d1..0611c021e88 100644 --- a/sql/sql_statistics.h +++ b/sql/sql_statistics.h @@ -92,6 +92,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); |