[MDEV-23779] Error upon querying the view, that selecting from versioned table with partitions Created: 2020-09-21  Updated: 2020-10-20  Resolved: 2020-10-20

Status: Closed
Project: MariaDB Server
Component/s: Partitioning, Versioned Tables, Views
Affects Version/s: 10.3, 10.4, 10.5
Fix Version/s: 10.3.26, 10.4.16, 10.5.7

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Aleksey Midenkov
Resolution: Fixed Votes: 0
Labels: None


 Description   

--source include/have_partition.inc
 
create table t1 (i int) with system versioning
  partition by system_time (partition p0 history, partition pn current);
insert into t1 values (1),(2),(3);
 
select * from t1 partition (pn);
create view v1 as select * from t1 partition (pn);
show create view v1;

'show create view v1' failed: 4142: SYSTEM_TIME partitions in table `t1` does not support historical query

MariaDB [mysqltest]> select * from v1;
ERROR 4142 (HY000): SYSTEM_TIME partitions in table `t1` does not support historical query

View is created as:

view_body_utf8=select `mysqltest`.`t1`.`i` AS `i` from `mysqltest`.`t1` PARTITION (`pn`) FOR SYSTEM_TIME ALL

which returns ERROR (after FOR SYSTEM_TIME ALL)


Generated at Thu Feb 08 09:24:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.