[MDEV-19626] Application-time period tables documentation update create table statement for Adding and Removing Time Periods section Created: 2019-05-29  Updated: 2019-06-05  Resolved: 2019-06-05

Status: Closed
Project: MariaDB Server
Component/s: Documentation
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Shahriyar Rzayev (Inactive) Assignee: Kenneth Dyer (Inactive)
Resolution: Fixed Votes: 0
Labels: docs, documentation


 Description   

Doc link:
https://mariadb.com/kb/en/library/temporal-data-tables/#adding-and-removing-time-periods

CREATE TABLE test.t2 (
   id INT PRIMARY KEY,
   time_1 TIMESTAMP(6),
   time_2 TIMESTAMP(2)
);

And then the alter follows resulted with error as:

MariaDB [test]> ALTER TABLE test.t2 ADD PERIOD FOR time_period(time_1, time_2);
ERROR 4153 (HY000): Fields of PERIOD FOR `time_period` have different types

So it seems to be the create statement of table should be instead:

CREATE TABLE test.t2 (
   id INT PRIMARY KEY,
   time_1 TIMESTAMP(6),
   time_2 TIMESTAMP(6)
);



 Comments   
Comment by Kenneth Dyer (Inactive) [ 2019-06-05 ]

Fixed.

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