Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
-
None
Description
Apparently timestamp-based versioning is incompatible with pre-mysql56_temporal_format. It's probably all right, but the errors produced due to this incompatibility are rather confusing and inconsistent.
SET @mysql56= @@mysql56_temporal_format; |
SET GLOBAL mysql56_temporal_format= 0; |
CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING; |
CREATE TABLE t2 LIKE t1; |
|
# Cleanup
|
DROP TABLE IF EXISTS t1, t2; |
SET GLOBAL mysql56_temporal_format= @mysql56; |
10.4 5f26f500 |
mysqltest: At line 4: query 'CREATE TABLE t2 LIKE t1' failed: 1033: Incorrect information in file: './test/t2.frm' |
So, t1 gets created without a complaint, but t2 with supposedly same structure fails.
Reproducible on 10.4+. 10.3 creates t2 all right, although what will happen to it afterwards, I can't tell.
If ROW START/END columns are defined explicitly, the table creation fails right away, but the error it produces is confusing.
SET @mysql56= @@mysql56_temporal_format; |
SET GLOBAL mysql56_temporal_format= 0; |
CREATE TABLE t1 (a INT, s TIMESTAMP(6) AS ROW START, e TIMESTAMP(6) AS ROW END, PERIOD FOR SYSTEM_TIME(s,e)) WITH SYSTEM VERSIONING; |
|
# Cleanup
|
DROP TABLE IF EXISTS t1; |
SET GLOBAL mysql56_temporal_format= @mysql56; |
mysqltest: At line 3: query 'CREATE TABLE t1 (a INT, s TIMESTAMP(6) AS ROW START, e TIMESTAMP(6) AS ROW END, PERIOD FOR SYSTEM_TIME(s,e)) WITH SYSTEM VERSIONING' failed: 4110: `s` must be of type TIMESTAMP(6) for system-versioned table `t1` |
This variation is reproducible on 10.3+.
Attachments
Issue Links
- duplicates
-
MDEV-28545 MyISAM reorganize partition corrupt older table format
- Closed
- relates to
-
MDEV-16542 Fix ALTER TABLE FORCE to upgrade temporal types
- Closed
-
MDEV-28545 MyISAM reorganize partition corrupt older table format
- Closed