diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2018-12-26 13:24:45 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2019-08-11 12:32:08 +0300 |
commit | cdbac54df0bd857a053decd66b6067abf15a6801 (patch) | |
tree | 0e23f602802e63e884c807c9eabed91cdb4851a3 /mysql-test/suite/versioning/t | |
parent | 43882e764d6867c6855b1ff057758a3f08b25c55 (diff) | |
download | mariadb-git-cdbac54df0bd857a053decd66b6067abf15a6801.tar.gz |
MDEV-17613 MIN/MAX Optimization (Select tables optimized away) does not work
Prune to now-partition when there is no FOR SYSTEM_TIME clause.
Diffstat (limited to 'mysql-test/suite/versioning/t')
-rw-r--r-- | mysql-test/suite/versioning/t/partition.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test index cd16ab7c466..29e4c413f77 100644 --- a/mysql-test/suite/versioning/t/partition.test +++ b/mysql-test/suite/versioning/t/partition.test @@ -497,6 +497,27 @@ create or replace table t1 (f int) with system versioning partition by hash(f); --error 0,ER_DELAYED_NOT_SUPPORTED insert delayed into t1 values (1); +--echo # +--echo # MDEV-17613 MIN/MAX Optimization (Select tables optimized away) does not work +--echo # +--disable_query_log +set @saved_storage_engine= @@default_storage_engine; +if ($MTR_COMBINATION_HEAP) +{ + # This case does not work with HEAP + set default_storage_engine= myisam; +} +--enable_query_log +create or replace table t1 (pk int primary key) with system versioning +partition by system_time ( + partition p1 history, + partition pn current); +insert into t1 values (1), (2); +explain select max(pk) from t1; +--disable_query_log +set default_storage_engine= @saved_storage_engine; +--enable_query_log + --echo # Test cleanup drop database test; create database test; |