1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge 10.1 into 10.2

This commit is contained in:
Marko Mäkelä
2018-08-02 08:19:57 +03:00
172 changed files with 3937 additions and 1012 deletions

View File

@ -3065,6 +3065,39 @@ int read_statistics_for_table(THD *thd, TABLE *table, TABLE_LIST *stat_tables)
}
/**
@breif
Cleanup of min/max statistical values for table share
*/
void delete_stat_values_for_table_share(TABLE_SHARE *table_share)
{
TABLE_STATISTICS_CB *stats_cb= &table_share->stats_cb;
Table_statistics *table_stats= stats_cb->table_stats;
if (!table_stats)
return;
Column_statistics *column_stats= table_stats->column_stats;
if (!column_stats)
return;
for (Field **field_ptr= table_share->field;
*field_ptr;
field_ptr++, column_stats++)
{
if (column_stats->min_value)
{
delete column_stats->min_value;
column_stats->min_value= NULL;
}
if (column_stats->max_value)
{
delete column_stats->max_value;
column_stats->max_value= NULL;
}
}
}
/**
@brief
Check whether any statistics is to be read for tables from a table list