Skip to content
Permalink
Browse files
MDEV-15062 Information Schema COLUMNS Table does not show system vers…
…ioning information

get_schema_column_record(): print 'WITHOUT SYSTEM VERSIONING` in 'EXTRA'
for such fields
  • Loading branch information
kevgs authored and vuvova committed Apr 10, 2018
1 parent 339b905 commit bb56a06
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
@@ -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))

0 comments on commit bb56a06

Please sign in to comment.