1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-26750: Estimation for filtered rows is far off with JSON_HB histogram

Fix a bug in position_in_interval(). Do not overwrite one interval endpoint
with another.
This commit is contained in:
Sergei Petrunia
2021-10-18 16:31:18 +03:00
parent 27539cd2c8
commit f3f78bed85
3 changed files with 61 additions and 9 deletions

View File

@ -276,3 +276,22 @@ select histogram from mysql.column_stats where table_name = 't1';
drop table t1;
--echo #
--echo # MDEV-26750: Estimation for filtered rows is far off with JSON_HB histogram
--echo #
create table t1 (c char(8));
insert into t1 values ('1x');
insert into t1 values ('1x');
insert into t1 values ('1xx');
insert into t1 values ('0xx');
insert into t1 select * from t1;
insert into t1 select * from t1;
set histogram_type= JSON_HB;
analyze table t1 persistent for all;
analyze
select c from t1 where c > '1';
drop table t1;