diff options
| author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-09-02 14:57:05 +0200 |
|---|---|---|
| committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-09-02 14:57:05 +0200 |
| commit | 4f10d0918d91a98ba46e095fbe775409d3ce0d41 (patch) | |
| tree | 93c4ad3e7c7b349bda788659f7bc314f0faca519 /mysql-test/main/partition_range.test | |
| parent | 3ca68794c040041decd8d1bfaff20e49b2c85df3 (diff) | |
| parent | b0ff5a6a7393c057cd201aff63279e45d3e0cc49 (diff) | |
| download | mariadb-git-4f10d0918d91a98ba46e095fbe775409d3ce0d41.tar.gz | |
Merge branch '10.3' into 10.4
Diffstat (limited to 'mysql-test/main/partition_range.test')
| -rw-r--r-- | mysql-test/main/partition_range.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/main/partition_range.test b/mysql-test/main/partition_range.test index 7f637f83ed9..37702db052b 100644 --- a/mysql-test/main/partition_range.test +++ b/mysql-test/main/partition_range.test @@ -973,4 +973,31 @@ SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a; --echo # Should be no more than 4 reads. SHOW status LIKE 'handler_read_key'; +--echo # +--echo # MDEV-18501 Partition pruning doesn't work for historical queries +--echo # +set time_zone= '+00:00'; +let $ts= `select unix_timestamp('2000-01-01 00:00:00') + 1`; + +--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR +create or replace table t1 (d datetime(6)) +partition by range (unix_timestamp(d)) ( + partition p0 values less than (1), + partition p1 values less than (maxvalue)); + +--echo # DECIMAL functions are now allowed, partitioning is done by integer part +eval create or replace table t1 (d timestamp(6)) +partition by range (unix_timestamp(d)) ( + partition p0 values less than ($ts), + partition p1 values less than (maxvalue)); + +insert into t1 values + # go to p0 + ('2000-01-01 00:00:00'), + ('2000-01-01 00:00:00.000001'), + # goes to p1 + ('2000-01-01 00:00:01'); +select * from t1 partition (p0); +select * from t1 partition (p1); + DROP TABLE t1, t2; |
