summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-07-20 14:53:24 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-07-20 14:53:24 +0300
commitca9276e37ea29468406d5ec7c17d2ad5c032637f (patch)
tree993694268974407425e53edfb4dcd10a04c2258e /sql/sql_statistics.h
parenta1e52e7f32cee7c204078db4c4beb88250d7e1f6 (diff)
parent57ec42bc321dee796ce8e711a4499cd665513009 (diff)
downloadmariadb-git-ca9276e37ea29468406d5ec7c17d2ad5c032637f.tar.gz
Merge 10.1 into 10.2
Diffstat (limited to 'sql/sql_statistics.h')
-rw-r--r--sql/sql_statistics.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/sql/sql_statistics.h b/sql/sql_statistics.h
index 145c207af58..fa3e8d6b894 100644
--- a/sql/sql_statistics.h
+++ b/sql/sql_statistics.h
@@ -279,7 +279,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 */
};
@@ -331,7 +333,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,
@@ -339,7 +341,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:
@@ -389,12 +391,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()
@@ -433,11 +435,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; }
@@ -448,7 +450,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);
}
};