mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge branch '10.0-galera' into 10.1
This commit is contained in:
@@ -972,6 +972,58 @@ set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivit
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
|
||||
set use_stat_tables=@save_use_stat_tables;
|
||||
|
||||
--echo #
|
||||
--echo # Bug mdev-11096: range condition over column without statistical data
|
||||
--echo #
|
||||
|
||||
set use_stat_tables='preferably';
|
||||
set optimizer_use_condition_selectivity=3;
|
||||
|
||||
create table t1(col1 char(32));
|
||||
insert into t1 values ('a'),('b'),('c'),('d'), ('e'),('f'),('g'),('h');
|
||||
analyze table t1 persistent for columns () indexes ();
|
||||
|
||||
explain extended
|
||||
select * from t1 where col1 > 'b' and col1 < 'e';
|
||||
select * from t1 where col1 > 'b' and col1 < 'e';
|
||||
|
||||
drop table t1;
|
||||
|
||||
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
set use_stat_tables=@save_use_stat_tables;
|
||||
|
||||
--echo #
|
||||
--echo # Bug mdev-9628: unindexed blob column without min-max statistics
|
||||
--echo # with optimizer_use_condition_selectivity=3
|
||||
--echo #
|
||||
|
||||
set use_stat_tables='preferably';
|
||||
set optimizer_use_condition_selectivity=3;
|
||||
|
||||
create table t1(col1 char(32));
|
||||
insert into t1 values ('a'),('b'),('c'),('d'), ('e'),('f'),('g'),('h');
|
||||
analyze table t1;
|
||||
|
||||
create table t2(col1 text);
|
||||
insert into t2 values ('a'),('b'),('c'),('d'), ('e'),('f'),('g'),('h');
|
||||
analyze table t2;
|
||||
|
||||
select * from t1 where col1 > 'b' and col1 < 'd';
|
||||
explain extended
|
||||
select * from t1 where col1 > 'b' and col1 < 'd';
|
||||
|
||||
select * from t2 where col1 > 'b' and col1 < 'd';
|
||||
explain extended
|
||||
select * from t2 where col1 > 'b' and col1 < 'd';
|
||||
|
||||
select * from t2 where col1 < 'b' and col1 > 'd';
|
||||
explain extended
|
||||
select * from t2 where col1 < 'b' and col1 > 'd';
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
set use_stat_tables=@save_use_stat_tables;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user