[Commits] e9541a81a13: Updates for the prev cset:
revision-id: e9541a81a1383cdf64a19c71791bc83f7ef25fcc (mariadb-10.6.1-350-ge9541a81a13) parent(s): 9a86900b3534d2d2bf112c32d7a7c0a3d3a1e46e author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2022-01-12 18:21:59 +0300 message: Updates for the prev cset: - Fix compilation on windows. - selectivity.result update, caused by "don't return selectivity of 0.0" logic in records_in_column_ranges. --- mysql-test/main/selectivity.result | 4 ++-- sql/opt_range.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/main/selectivity.result b/mysql-test/main/selectivity.result index d559d3c39f7..003b91a6a28 100644 --- a/mysql-test/main/selectivity.result +++ b/mysql-test/main/selectivity.result @@ -1245,8 +1245,8 @@ EXPLAIN EXTENDED SELECT * FROM language, country, continent WHERE country_group = lang_group AND lang_group IS NULL; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE country ALL NULL NULL NULL NULL 2 0.00 Using where -1 SIMPLE language ALL NULL NULL NULL NULL 6 0.00 Using where; Using join buffer (flat, BNL join) +1 SIMPLE country ALL NULL NULL NULL NULL 2 50.00 Using where +1 SIMPLE language ALL NULL NULL NULL NULL 6 16.67 Using where; Using join buffer (flat, BNL join) 1 SIMPLE continent ALL NULL NULL NULL NULL 6 100.00 Using join buffer (incremental, BNL join) Warnings: Note 1003 select `test`.`language`.`lang_group` AS `lang_group`,`test`.`language`.`lang` AS `lang`,`test`.`country`.`code` AS `code`,`test`.`country`.`country_group` AS `country_group`,`test`.`continent`.`cont_group` AS `cont_group`,`test`.`continent`.`cont` AS `cont` from `test`.`language` join `test`.`country` join `test`.`continent` where `test`.`language`.`lang_group` = `test`.`country`.`country_group` and `test`.`country`.`country_group` is null diff --git a/sql/opt_range.cc b/sql/opt_range.cc index bb5043eecd7..37cf054dfb0 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -3279,7 +3279,7 @@ double records_in_column_ranges(PARAM *param, uint idx, total_rows += rows; } if (total_rows == 0) - total_rows= MY_MIN(1, param->table->stat_records()); + total_rows= MY_MIN(1, rows2double(param->table->stat_records())); return total_rows; }
participants (1)
-
psergey