mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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
This commit is contained in:
committed by
Sergei Golubchik
parent
339b905579
commit
bb56a06d26
@ -61,4 +61,15 @@ a b
|
|||||||
3 4
|
3 4
|
||||||
select * from t for system_time as of timestamp now(6) where b is NULL;
|
select * from t for system_time as of timestamp now(6) where b is NULL;
|
||||||
a b
|
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;
|
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);
|
||||||
select * from t for system_time as of timestamp now(6) where b is NULL;
|
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;
|
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(", "));
|
||||||
buf.append(STRING_WITH_LEN("INVISIBLE"),cs);
|
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[17]->store(buf.ptr(), buf.length(), cs);
|
||||||
table->field[19]->store(field->comment.str, field->comment.length, cs);
|
table->field[19]->store(field->comment.str, field->comment.length, cs);
|
||||||
if (schema_table_store_record(thd, table))
|
if (schema_table_store_record(thd, table))
|
||||||
|
Reference in New Issue
Block a user