mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge 10.1 into 10.2
For MDEV-15955, the fix in create_tmp_field_from_item() would cause a compilation error. After a discussion with Alexander Barkov, the fix was omitted and only the test case was kept. In 10.3 and later, MDEV-15955 is fixed properly by overriding create_tmp_field() in Item_func_user_var.
This commit is contained in:
@ -2119,7 +2119,12 @@ int alloc_statistics_for_table(THD* thd, TABLE *table)
|
||||
Histogram_type hist_type= (Histogram_type) (thd->variables.histogram_type);
|
||||
uchar *histogram= NULL;
|
||||
if (hist_size > 0)
|
||||
histogram= (uchar *) alloc_root(&table->mem_root, hist_size * columns);
|
||||
{
|
||||
if ((histogram= (uchar *) alloc_root(&table->mem_root,
|
||||
hist_size * columns)))
|
||||
bzero(histogram, hist_size * columns);
|
||||
|
||||
}
|
||||
|
||||
if (!table_stats || !column_stats || !index_stats || !idx_avg_frequency ||
|
||||
(hist_size && !histogram))
|
||||
|
Reference in New Issue
Block a user