diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-02-01 13:49:33 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-02-01 13:49:33 +0100 |
commit | 60ea09eae6f464e8ec483f4d31f7b910a8451c28 (patch) | |
tree | 7b79f55a96c8bc9dc3f0353cc08f43b825fe8707 /sql/sql_statistics.cc | |
parent | 59eda73eff1a22ac0373d818bc802c05e82b5449 (diff) | |
parent | ff5186fd2b1ed06ed40fe3d817b41326e3f943d5 (diff) | |
download | mariadb-git-60ea09eae6f464e8ec483f4d31f7b910a8451c28.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r-- | sql/sql_statistics.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 13532f5f171..dfce00f08a9 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -2108,6 +2108,10 @@ int alloc_statistics_for_table(THD* thd, TABLE *table) ulonglong *idx_avg_frequency= (ulonglong*) alloc_root(&table->mem_root, sizeof(ulonglong) * key_parts); + if (table->file->ha_rnd_init(TRUE)) + DBUG_RETURN(1); + table->file->ha_rnd_end(); + uint columns= 0; for (field_ptr= table->field; *field_ptr; field_ptr++) { |