diff options
-rw-r--r-- | mysql-test/main/features.result | 1 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/sysvars.result | 3 | ||||
-rw-r--r-- | mysql-test/suite/versioning/t/sysvars.test | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 1 | ||||
-rw-r--r-- | sql/sql_class.h | 1 | ||||
-rw-r--r-- | sql/table.cc | 1 |
6 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/main/features.result b/mysql-test/main/features.result index 8a4a200e805..f31a6672549 100644 --- a/mysql-test/main/features.result +++ b/mysql-test/main/features.result @@ -13,6 +13,7 @@ Feature_invisible_columns 0 Feature_json 0 Feature_locale 0 Feature_subquery 0 +Feature_system_versioning 0 Feature_timezone 0 Feature_trigger 0 Feature_window_functions 0 diff --git a/mysql-test/suite/versioning/r/sysvars.result b/mysql-test/suite/versioning/r/sysvars.result index 22f53ca6fbe..b23742462d1 100644 --- a/mysql-test/suite/versioning/r/sysvars.result +++ b/mysql-test/suite/versioning/r/sysvars.result @@ -126,4 +126,7 @@ select * from t for system_time between '0-0-0' and current_timestamp(6); a 2 1 +show status like "Feature_system_versioning"; +Variable_name Value +Feature_system_versioning 2 drop table t; diff --git a/mysql-test/suite/versioning/t/sysvars.test b/mysql-test/suite/versioning/t/sysvars.test index 08b520e959e..160af12fe02 100644 --- a/mysql-test/suite/versioning/t/sysvars.test +++ b/mysql-test/suite/versioning/t/sysvars.test @@ -84,4 +84,6 @@ select * from t for system_time all; select * from t for system_time from '0-0-0' to current_timestamp(6); select * from t for system_time between '0-0-0' and current_timestamp(6); +show status like "Feature_system_versioning"; + drop table t; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 28b5d3bd0ad..dd79cb39f80 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -8558,6 +8558,7 @@ SHOW_VAR status_vars[]= { {"Feature_json", (char*) offsetof(STATUS_VAR, feature_json), SHOW_LONG_STATUS}, {"Feature_locale", (char*) offsetof(STATUS_VAR, feature_locale), SHOW_LONG_STATUS}, {"Feature_subquery", (char*) offsetof(STATUS_VAR, feature_subquery), SHOW_LONG_STATUS}, + {"Feature_system_versioning", (char*) offsetof(STATUS_VAR, feature_system_versioning), SHOW_LONG_STATUS}, {"Feature_timezone", (char*) offsetof(STATUS_VAR, feature_timezone), SHOW_LONG_STATUS}, {"Feature_trigger", (char*) offsetof(STATUS_VAR, feature_trigger), SHOW_LONG_STATUS}, {"Feature_window_functions", (char*) offsetof(STATUS_VAR, feature_window_functions), SHOW_LONG_STATUS}, diff --git a/sql/sql_class.h b/sql/sql_class.h index 22b8e3e18f0..bc4f37175a5 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -823,6 +823,7 @@ typedef struct system_status_var ulong feature_json; /* +1 when JSON function appears in the statement */ ulong feature_locale; /* +1 when LOCALE is set */ ulong feature_subquery; /* +1 when subqueries are used */ + ulong feature_system_versioning; /* +1 opening a table WITH SYSTEM VERSIONING */ ulong feature_timezone; /* +1 when XPATH is used */ ulong feature_trigger; /* +1 opening a table with triggers */ ulong feature_xml; /* +1 when XPATH is used */ diff --git a/sql/table.cc b/sql/table.cc index bc61e77c972..b4da5cdadb0 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1777,6 +1777,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, vers_can_native= plugin_hton(se_plugin)->flags & HTON_NATIVE_SYS_VERSIONING; row_start_field= row_start; row_end_field= row_end; + status_var_increment(thd->status_var.feature_system_versioning); } // if (system_period == NULL) for (i=0 ; i < share->fields; i++, strpos+=field_pack_length, field_ptr++) |