Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-23779

Error upon querying the view, that selecting from versioned table with partitions

    XMLWordPrintable

    Details

      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)

        Attachments

          Activity

            People

            Assignee:
            midenok Aleksey Midenkov
            Reporter:
            alice Alice Sherepa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: