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

LIMIT clause allows not only integer values while creating system versioned table

    XMLWordPrintable

Details

    Description

      LIMIT clause -how many rows in partition :

      MariaDB [test]> create table t1 (i int) with system versioning   partition by system_time limit 11.999999 (partition p0 history, partition pn current);
      Query OK, 0 rows affected (0.103 sec)
       
      MariaDB [test]> show create table t1;
      +-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                                                                                                                      |
      +-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | t1    | CREATE TABLE `t1` (
        `i` int(11) DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
       PARTITION BY SYSTEM_TIME LIMIT 11
      (PARTITION `p0` HISTORY ENGINE = InnoDB,
       PARTITION `pn` CURRENT ENGINE = InnoDB) |
      +-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.006 sec)
      

      the same with INTERVAL

      MariaDB [test]> create or replace table t1 (i int) with system versioning   partition by system_time INTERVAL 1.4 WEEK;
      Query OK, 0 rows affected (0.105 sec)
       
      MariaDB [test]> show create table t1;
      +-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                                                                                             |
      +-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | t1    | CREATE TABLE `t1` (
        `i` int(11) DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
       PARTITION BY SYSTEM_TIME INTERVAL 7 DAY STARTS TIMESTAMP'2020-09-21 00:00:00'
      PARTITIONS 2 |
      +-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.002 sec)
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.