summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-01-09 19:06:21 +0100
committerAleksey Midenkov <midenok@gmail.com>2018-01-10 11:54:21 +0300
commit26971c9aea67a62f348cd105348a8dc4407bcf4a (patch)
tree64cfafe1f5d925e1851ef954cf680fef05a08543 /sql
parent6470a9343dfb03d020b96e1a7db8695157387987 (diff)
downloadmariadb-git-26971c9aea67a62f348cd105348a8dc4407bcf4a.tar.gz
SQL: versioning info in INFORMATION_SCHEMA
* show SYSTEM VERSIONED in INFORMATION_SCHEMA.TABLES * show ROW START/ROW END columns in INFORMATION_SCHEMA.COLUMNS
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_show.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index b82a57a84eb..41cf8556e87 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -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 */