[MDEV-23780] LIMIT clause allows not only integer values while creating system versioned table Created: 2020-09-21  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Versioned Tables
Affects Version/s: 10.3, 10.4, 10.5
Fix Version/s: 10.4, 10.5

Type: Bug Priority: Minor
Reporter: Alice Sherepa Assignee: Aleksey Midenkov
Resolution: Unresolved Votes: 0
Labels: None


 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)


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