mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
@ -52,6 +52,7 @@
|
||||
#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. */
|
||||
@ -869,6 +870,7 @@ 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);
|
||||
|
Reference in New Issue
Block a user