mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Add a counter for the number of select statements using window functions
The counter is available via SHOW [GLOBAL] STATUS and will be reported by the feedback plugin.
This commit is contained in:
@ -8411,6 +8411,7 @@ SHOW_VAR status_vars[]= {
|
|||||||
{"Feature_subquery", (char*) offsetof(STATUS_VAR, feature_subquery), SHOW_LONG_STATUS},
|
{"Feature_subquery", (char*) offsetof(STATUS_VAR, feature_subquery), SHOW_LONG_STATUS},
|
||||||
{"Feature_timezone", (char*) offsetof(STATUS_VAR, feature_timezone), 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_trigger", (char*) offsetof(STATUS_VAR, feature_trigger), SHOW_LONG_STATUS},
|
||||||
|
{"Feature_window_functions", (char*) offsetof(STATUS_VAR, feature_window_functions), SHOW_LONG_STATUS},
|
||||||
{"Feature_xml", (char*) offsetof(STATUS_VAR, feature_xml), SHOW_LONG_STATUS},
|
{"Feature_xml", (char*) offsetof(STATUS_VAR, feature_xml), SHOW_LONG_STATUS},
|
||||||
{"Flush_commands", (char*) &show_flush_commands, SHOW_SIMPLE_FUNC},
|
{"Flush_commands", (char*) &show_flush_commands, SHOW_SIMPLE_FUNC},
|
||||||
{"Handler_commit", (char*) offsetof(STATUS_VAR, ha_commit_count), SHOW_LONG_STATUS},
|
{"Handler_commit", (char*) offsetof(STATUS_VAR, ha_commit_count), SHOW_LONG_STATUS},
|
||||||
|
@ -789,6 +789,7 @@ typedef struct system_status_var
|
|||||||
ulong feature_timezone; /* +1 when XPATH is used */
|
ulong feature_timezone; /* +1 when XPATH is used */
|
||||||
ulong feature_trigger; /* +1 opening a table with triggers */
|
ulong feature_trigger; /* +1 opening a table with triggers */
|
||||||
ulong feature_xml; /* +1 when XPATH is used */
|
ulong feature_xml; /* +1 when XPATH is used */
|
||||||
|
ulong feature_window_functions; /* +1 when window functions are used */
|
||||||
|
|
||||||
/* From MASTER_GTID_WAIT usage */
|
/* From MASTER_GTID_WAIT usage */
|
||||||
ulonglong master_gtid_wait_timeouts; /* Number of timeouts */
|
ulonglong master_gtid_wait_timeouts; /* Number of timeouts */
|
||||||
|
@ -2699,6 +2699,8 @@ bool JOIN::make_aggr_tables_info()
|
|||||||
if (curr_tab->window_funcs_step->setup(thd, &select_lex->window_funcs,
|
if (curr_tab->window_funcs_step->setup(thd, &select_lex->window_funcs,
|
||||||
curr_tab))
|
curr_tab))
|
||||||
DBUG_RETURN(true);
|
DBUG_RETURN(true);
|
||||||
|
/* Count that we're using window functions. */
|
||||||
|
status_var_increment(thd->status_var.feature_window_functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
fields= curr_fields_list;
|
fields= curr_fields_list;
|
||||||
|
Reference in New Issue
Block a user