Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.5.9
-
None
Description
According to the documentation there are two ways to create a versioned table: with implicit and explicit row_start and row_end columns.
I noticed that selecting the row_end and row_start columns from the information schema is only possible when they were defined explicitly, yet if they are part of a unique index, then index columns can always be selected.
CREATE TABLE test_1(
|
id INT NOT NULL,
|
UNIQUE INDEX(id),
|
row_start TIMESTAMP(6) GENERATED ALWAYS AS ROW START, |
row_end TIMESTAMP(6) GENERATED ALWAYS AS ROW END, |
PERIOD FOR SYSTEM_TIME(row_start, row_end)
|
) WITH SYSTEM VERSIONING;
|
CREATE TABLE test_2(id INT NOT NULL, UNIQUE INDEX(id)) WITH SYSTEM VERSIONING;
|
Compare
SELECT * FROM `COLUMNS` WHERE TABLE_NAME IN ('test_1', 'test_2'); |
With
SELECT * FROM `STATISTICS` WHERE TABLE_NAME IN ('test_1', 'test_2'); |
I think this is a strange inconsistency.