diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2022-01-19 18:35:27 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2022-01-19 18:35:27 +0300 |
commit | da78030ec87e30d2218a0de182ffb87fc541da97 (patch) | |
tree | 7f7ce9bb818d56679eaf034b52f05738b8d83da1 /sql/table.h | |
parent | e222e44d1bfc995870430bb90d8ac97e91f66cb4 (diff) | |
parent | ce4956f3229a8b2c26a4913fdbc190b5c822cb8e (diff) | |
download | mariadb-git-preview-10.8-MDEV-26519-json-histograms.tar.gz |
Merge MDEV-26519: JSON_HB histograms into 10.8preview-10.8-MDEV-26519-json-histograms
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sql/table.h b/sql/table.h index 6aa75df39c6..221e18bc926 100644 --- a/sql/table.h +++ b/sql/table.h @@ -679,16 +679,21 @@ class TABLE_STATISTICS_CB public: MEM_ROOT mem_root; /* MEM_ROOT to allocate statistical data for the table */ Table_statistics *table_stats; /* Structure to access the statistical data */ - ulong total_hist_size; /* Total size of all histograms */ + + /* + Whether the table has histograms. + (If the table has none, histograms_are_ready() can finish sooner) + */ + bool have_histograms; bool histograms_are_ready() const { - return !total_hist_size || hist_state.is_ready(); + return !have_histograms || hist_state.is_ready(); } bool start_histograms_load() { - return total_hist_size && hist_state.start_load(); + return have_histograms && hist_state.start_load(); } void end_histograms_load() { hist_state.end_load(); } |