Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.3(EOL), 10.4(EOL), 10.5
Description
Reproduce
-- source include/have_partition.inc
|
|
set timestamp= unix_timestamp('2000-01-01 00:00:00'); |
create or replace table t1 (x int) with system versioning |
partition by system_time interval 1 hour |
(partition p0 history, partition pn current); |
|
insert into t1 values (330); |
set timestamp= unix_timestamp('2000-01-01 00:10:00'); |
update t1 set x= x + 1; |
|
--echo # Check how pruning boundaries work
|
explain partitions select * from t1 for system_time as of '2000-01-01 00:59:58'; |
explain partitions select * from t1 for system_time as of '2000-01-01 00:59:59'; |
|
drop tables t1; |
Result
Only pn selected.
explain partitions select * from t1 for system_time as of '2000-01-01 00:59:59'; |
id select_type table partitions type possible_keys key key_len ref rows Extra |
1 SIMPLE t1 pn system NULL NULL NULL NULL 1 |
Expected
p0, pn selected.
explain partitions select * from t1 for system_time as of '2000-01-01 00:59:59'; |
id select_type table partitions type possible_keys key key_len ref rows Extra |
1 SIMPLE t1 p0, pn system NULL NULL NULL NULL 1 |
Attachments
Issue Links
- relates to
-
MDEV-17554 Auto-create history partitions for system-versioned tables
- Closed
-
MDEV-25529 Auto-create: Pre-existing historical data is not partitioned as specified by ALTER
- Stalled
-
MDEV-29114 Pruning depends on current timestamp for partition by SYSTEM_TIME
- Stalled