1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

SQL: versioning info in INFORMATION_SCHEMA

* show SYSTEM VERSIONED in INFORMATION_SCHEMA.TABLES
* show ROW START/ROW END columns in INFORMATION_SCHEMA.COLUMNS
This commit is contained in:
Sergei Golubchik
2018-01-09 19:06:21 +01:00
committed by Aleksey Midenkov
parent 6470a9343d
commit 26971c9aea
3 changed files with 80 additions and 1 deletions

View File

@ -5459,7 +5459,10 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables,
else
{
DBUG_ASSERT(share->tmp_table == NO_TMP_TABLE);
table->field[3]->store(STRING_WITH_LEN("BASE TABLE"), cs);
if (share->versioned)
table->field[3]->store(STRING_WITH_LEN("SYSTEM VERSIONED"), cs);
else
table->field[3]->store(STRING_WITH_LEN("BASE TABLE"), cs);
}
for (int i= 4; i < 20; i++)
@ -5948,6 +5951,15 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables,
else
buf.set(STRING_WITH_LEN("VIRTUAL GENERATED"), cs);
}
else if (field->flags & VERS_SYSTEM_FIELD)
{
if (field->flags & VERS_SYS_START_FLAG)
table->field[21]->store(STRING_WITH_LEN("ROW START"), cs);
else
table->field[21]->store(STRING_WITH_LEN("ROW END"), cs);
table->field[21]->set_notnull();
table->field[20]->store(STRING_WITH_LEN("ALWAYS"), cs);
}
else
table->field[20]->store(STRING_WITH_LEN("NEVER"), cs);
/*Invisible can coexist with auto_increment and virtual */