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/opt_range.cc | |
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/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 06063cb9ae1..37cf054dfb0 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -3277,7 +3277,10 @@ double records_in_column_ranges(PARAM *param, uint idx, break; } total_rows += rows; - } + } + if (total_rows == 0) + total_rows= MY_MIN(1, rows2double(param->table->stat_records())); + return total_rows; } |