Commit bb56a06d authored by Eugene Kosov's avatar Eugene Kosov Committed by Sergei Golubchik

MDEV-15062 Information Schema COLUMNS Table does not show system versioning information

get_schema_column_record(): print 'WITHOUT SYSTEM VERSIONING` in 'EXTRA'
for such fields
parent 339b9055
......@@ -61,4 +61,15 @@ a b
3 4
select * from t for system_time as of timestamp now(6) where b is NULL;
a b
create or replace table t (x int with system versioning, y int);
select column_name, extra from information_schema.columns where table_name='t';
column_name extra
x
y WITHOUT SYSTEM VERSIONING
show create table t;
Table Create Table
t CREATE TABLE `t` (
`x` int(11) DEFAULT NULL,
`y` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING
) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
drop table t;
......@@ -30,4 +30,11 @@ insert into t values (1, 2), (3, 4);
select * from t for system_time as of timestamp now(6);
select * from t for system_time as of timestamp now(6) where b is NULL;
#
# MDEV-15062 Information Schema COLUMNS Table does not show system versioning information
#
create or replace table t (x int with system versioning, y int);
select column_name, extra from information_schema.columns where table_name='t';
show create table t;
drop table t;
......@@ -6000,6 +6000,12 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
buf.append(STRING_WITH_LEN(", "));
buf.append(STRING_WITH_LEN("INVISIBLE"),cs);
}
if (field->vers_update_unversioned())
{
if (buf.length())
buf.append(STRING_WITH_LEN(", "));
buf.append(STRING_WITH_LEN("WITHOUT SYSTEM VERSIONING"), cs);
}
table->field[17]->store(buf.ptr(), buf.length(), cs);
table->field[19]->store(field->comment.str, field->comment.length, cs);
if (schema_table_store_record(thd, table))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment