summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/suite/versioning/r/optimized.result11
-rw-r--r--mysql-test/suite/versioning/t/optimized.test7
-rw-r--r--sql/sql_show.cc6
3 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/suite/versioning/r/optimized.result b/mysql-test/suite/versioning/r/optimized.result
index 1586676b904..2385a43d0a4 100644
--- a/mysql-test/suite/versioning/r/optimized.result
+++ b/mysql-test/suite/versioning/r/optimized.result
@@ -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;
diff --git a/mysql-test/suite/versioning/t/optimized.test b/mysql-test/suite/versioning/t/optimized.test
index 93dd6ed6fc6..054c1d32559 100644
--- a/mysql-test/suite/versioning/t/optimized.test
+++ b/mysql-test/suite/versioning/t/optimized.test
@@ -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;
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 3c361c693b4..38a13c49278 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -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))