1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-27230: Estimation for filtered rows less precise ...

Fix the code in Histogram_json_hb::range_selectivity that handles
special cases: a non-inclusive endpoint hitting a bucket boundary...
This commit is contained in:
Sergei Petrunia
2021-12-13 23:46:04 +03:00
parent 08f1c4a2e0
commit 905634dc3f
3 changed files with 28 additions and 0 deletions

View File

@ -380,3 +380,13 @@ analyze select * from t2 where a =100;
drop table t0,t1,t2;
--echo #
--echo # MDEV-27230: Estimation for filtered rows less precise ...
--echo #
create table t1 (a char(1));
insert into t1 select chr(seq%26+97) from seq_1_to_50;
insert into t1 select ':' from t1;
analyze table t1 persistent for all;
analyze select COUNT(*) FROM t1 WHERE a <> 'a';
analyze select COUNT(*) FROM t1 WHERE a < 'a';
drop table t1;