Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
Unexpected results
-
Q3/2026 Server Maintenance
Description
versioning.partition fails on replay
explain partitions select * from t1 for system_time all where row_end = @ts; |
id select_type table partitions type possible_keys key key_len ref rows Extra |
-1 SIMPLE t1 p0_p0sp0,p0_p0sp1,p2_p2sp0,p2_p2sp1 ALL NULL NULL NULL NULL 4 Using where |
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables |
MTR testcase to repro issue: (Say example.test)
-- source include/have_partition.inc
|
-- source suite/versioning/common.inc
|
-- source suite/versioning/engines.inc
|
-- source include/have_sequence.inc
|
|
|
set timestamp=unix_timestamp('2001-02-03 10:20:30'); |
create or replace table t1 (i int) with system versioning |
partition by system_time interval 1 day |
subpartition by key (i) subpartitions 2 |
(partition p1 history, partition pn current); |
set timestamp=unix_timestamp('2001-02-03 10:20:40'); |
insert t1 values (1); delete from t1; |
set timestamp=unix_timestamp('2001-02-04 10:20:50'); |
insert t1 values (2); delete from t1; |
|
|
set timestamp=unix_timestamp('2001-02-04 10:20:55'); |
alter table t1 add partition (partition p0 history, partition p2 history); |
set timestamp=unix_timestamp('2001-02-04 10:30:00'); |
insert t1 values (4),(5); |
set timestamp=unix_timestamp('2001-02-04 10:30:10'); |
update t1 set i=6 where i=5; |
|
|
|
|
alter table t1 rebuild partition p0, p1, p2; |
|
|
set @ts=(select partition_description from information_schema.partitions |
where table_schema='test' and table_name='t1' and partition_name='p0' limit 1); |
explain partitions select * from t1 for system_time all where row_end = @ts; |
|
|
drop table t1; |
How to repro
./mtr example.test --record |
./mtr example.test --replay-server |
Attachments
Issue Links
- duplicates
-
MDEV-39455 [Limitation?] User defined variable not recorded into context
-
- In Review
-
- relates to
-
MDEV-39368 Add mtr --replay-server option to test Optimizer Context Replay
-
- In Progress
-