[MDEV-21427] Application-time period table can be temporary despite the error ER_PERIOD_TEMPORARY_NOT_ALLOWED Created: 2020-01-06  Updated: 2021-05-25

Status: Open
Project: MariaDB Server
Component/s: Data Definition - Temporary, Versioned Tables
Affects Version/s: 10.4, 10.5
Fix Version/s: 10.4, 10.5

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Nikita Malyavin
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks
Relates
relates to MDEV-21428 InnoDB: Failing assertion: prebuilt->... Confirmed

 Description   

A plain attempt to create a temporary table with app-time period fails:

MariaDB [test]> create temporary table tmp (a int, s date, e date, period for app(s,e));
ERROR 4152 (HY000): Application-time period table cannot be temporary

However, creating the same table via CREATE .. LIKE is possible:

10.4 89ae01fd0085cf0d1af272eca545e49fdadf4538

MariaDB [test]> create table t1 (a int, s date, e date, period for app(s,e));
Query OK, 0 rows affected (0.226 sec)
 
MariaDB [test]> create temporary table tmp like t1;
Query OK, 0 rows affected (0.048 sec)

Which of course ends up with the structure which cannot be re-created:

MariaDB [test]> show create table tmp;
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                              |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tmp   | CREATE TEMPORARY TABLE `tmp` (
  `a` int(11) DEFAULT NULL,
  `s` date NOT NULL,
  `e` date NOT NULL,
  PERIOD FOR `app` (`s`, `e`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.001 sec)

It should be consistent, either one way or another.


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