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

Merge 10.2 into 10.3

This commit is contained in:
Marko Mäkelä
2020-07-20 15:11:59 +03:00
21 changed files with 166 additions and 122 deletions

View File

@ -267,7 +267,9 @@ public:
uchar *min_max_record_buffers; /* Record buffers for min/max values */
Column_statistics *column_stats; /* Array of statistical data for columns */
Index_statistics *index_stats; /* Array of statistical data for indexes */
ulong *idx_avg_frequency; /* Array of records per key for index prefixes */
/* Array of records per key for index prefixes */
ulonglong *idx_avg_frequency;
uchar *histograms; /* Sequence of histograms */
};
@ -319,7 +321,7 @@ private:
CHAR values are stripped of trailing spaces.
Flexible values are stripped of their length prefixes.
*/
ulong avg_length;
ulonglong avg_length;
/*
The ratio N/D multiplied by the scale factor Scale_factor_avg_frequency,
@ -327,7 +329,7 @@ private:
N is the number of rows with not null value in the column,
D the number of distinct values among them
*/
ulong avg_frequency;
ulonglong avg_frequency;
public:
@ -377,12 +379,12 @@ public:
void set_avg_length (double val)
{
avg_length= (ulong) (val * Scale_factor_avg_length);
avg_length= (ulonglong) (val * Scale_factor_avg_length);
}
void set_avg_frequency (double val)
{
avg_frequency= (ulong) (val * Scale_factor_avg_frequency);
avg_frequency= (ulonglong) (val * Scale_factor_avg_frequency);
}
bool min_max_values_are_provided()
@ -421,11 +423,11 @@ private:
in the first k components, and D is the number of distinct
k-component prefixes among them
*/
ulong *avg_frequency;
ulonglong *avg_frequency;
public:
void init_avg_frequency(ulong *ptr) { avg_frequency= ptr; }
void init_avg_frequency(ulonglong *ptr) { avg_frequency= ptr; }
bool avg_frequency_is_inited() { return avg_frequency != NULL; }
@ -436,7 +438,7 @@ public:
void set_avg_frequency(uint i, double val)
{
avg_frequency[i]= (ulong) (val * Scale_factor_avg_frequency);
avg_frequency[i]= (ulonglong) (val * Scale_factor_avg_frequency);
}
};