diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-03-20 13:04:36 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-03-20 13:04:36 +0200 |
commit | d8dc8537e4f6cfb3b0c63123a8d9df5c1101970d (patch) | |
tree | 036edbea930caa77afe4fb2a8acef9242b54805b /mysql-test/main/func_group.result | |
parent | 550cf13eb3e8a25826a0fa67935fc28ee7adb0c8 (diff) | |
parent | 0f3045e4329d900cc95f84b5fe9ff5c9d96240c7 (diff) | |
download | mariadb-git-d8dc8537e4f6cfb3b0c63123a8d9df5c1101970d.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/main/func_group.result')
-rw-r--r-- | mysql-test/main/func_group.result | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/mysql-test/main/func_group.result b/mysql-test/main/func_group.result index 9311a556191..fc6f93a938a 100644 --- a/mysql-test/main/func_group.result +++ b/mysql-test/main/func_group.result @@ -2460,7 +2460,38 @@ count(*)+sleep(0) 2 drop table t1; # -# Start of 10.3 tests +# MDEV-25112: MIN/MAX optimization for query containing BETWEEN in WHERE +# +create table t1 (a int) engine=myisam; +insert into t1 values (267), (273), (287), (303), (308); +select max(a) from t1 where a < 303 and (a between 267 AND 287); +max(a) +287 +explain select max(a) from t1 where a < 303 and (a between 267 AND 287); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +select min(a) from t1 where a > 267 and (a between 273 AND 303); +min(a) +273 +explain select min(a) from t1 where a > 267 and (a between 273 AND 303); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +create index idx on t1(a); +select max(a) from t1 where a < 303 and (a between 267 AND 287); +max(a) +287 +explain select max(a) from t1 where a < 303 and (a between 267 AND 287); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +select min(a) from t1 where a > 267 and (a between 273 AND 303); +min(a) +273 +explain select min(a) from t1 where a > 267 and (a between 273 AND 303); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +drop table t1; +# +# End of 10.2 tests # # # MDEV-9408 CREATE TABLE SELECT MAX(int_column) creates different columns for table vs view @@ -2492,3 +2523,6 @@ t2 CREATE TABLE `t2` ( DROP TABLE t2; DROP VIEW v1; DROP TABLE t1; +# +# End of 10.3 tests +# |