From 28bed454693dc9605194137cfd736db500a5cf2e Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 11 Jan 2018 14:52:26 +0100 Subject: [PATCH] debug: don't hide row_start/row_end columns for testing --- mysql-test/suite/versioning/r/debug.result | 17 ++++++++++++++++- mysql-test/suite/versioning/t/debug.test | 8 +++++++- sql/handler.cc | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/versioning/r/debug.result b/mysql-test/suite/versioning/r/debug.result index 6e704011002..406717f8b5d 100644 --- a/mysql-test/suite/versioning/r/debug.result +++ b/mysql-test/suite/versioning/r/debug.result @@ -35,5 +35,20 @@ tt3 CREATE TEMPORARY TABLE `tt3` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 disconnect con1; connection default; +set debug_dbug='+d,sysvers_show'; +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING +create table t4 (a int); +show create table t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `a` int(11) DEFAULT NULL, + `row_start` timestamp(6) GENERATED ALWAYS AS ROW START, + `row_end` timestamp(6) GENERATED ALWAYS AS ROW END, + PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING set global debug_dbug=@old_dbug; -drop table t1, t2, t3; +drop table t1, t2, t3, t4; diff --git a/mysql-test/suite/versioning/t/debug.test b/mysql-test/suite/versioning/t/debug.test index 027af48fff5..c6d5bd60861 100644 --- a/mysql-test/suite/versioning/t/debug.test +++ b/mysql-test/suite/versioning/t/debug.test @@ -25,5 +25,11 @@ show create table tt3; --disconnect con1 --connection default +set debug_dbug='+d,sysvers_show'; + +show create table t3; +create table t4 (a int); +show create table t4; + set global debug_dbug=@old_dbug; -drop table t1, t2, t3; +drop table t1, t2, t3, t4; diff --git a/sql/handler.cc b/sql/handler.cc index 84cb550143c..c030cea033e 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -6874,7 +6874,7 @@ static Create_field *vers_init_sys_field(THD *thd, const char *field_name, int f f->set_handler(&type_handler_timestamp2); f->length= MAX_DATETIME_PRECISION; } - f->invisible= INVISIBLE_SYSTEM; + f->invisible= DBUG_EVALUATE_IF("sysvers_show", VISIBLE, INVISIBLE_SYSTEM); if (f->check(thd)) return NULL;