MDEV-15978 Add Feature_system_versioning status variable

This commit is contained in:
Aleksey Midenkov 2018-04-28 20:40:34 +03:00 committed by Sergei Golubchik
parent da25860d4a
commit fddaaf7295
6 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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},

View File

@ -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 */

View File

@ -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++)