MySQL 8.4.2
Source Code Documentation
|
#include "sql/sql_show_status.h"
#include "lex_string.h"
#include "my_alloc.h"
#include "my_sqlcommand.h"
#include "sql/item_cmpfunc.h"
#include "sql/mem_root_array.h"
#include "sql/parse_tree_items.h"
#include "sql/parse_tree_node_base.h"
#include "sql/parse_tree_nodes.h"
#include "sql/parser_yystype.h"
#include "sql/sql_class.h"
#include "sql/sql_lex.h"
#include "sql/strfunc.h"
#include "sql_string.h"
#include "string_with_len.h"
Functions | |
static Query_block * | build_query (const POS &pos, THD *thd, enum_sql_command command, const LEX_CSTRING &table_name, const String *wild, Item *where_cond) |
Build a replacement query for SHOW STATUS. More... | |
Query_block * | build_show_session_status (const POS &pos, THD *thd, const String *wild, Item *where_cond) |
Query_block * | build_show_global_status (const POS &pos, THD *thd, const String *wild, Item *where_cond) |
Query_block * | build_show_session_variables (const POS &pos, THD *thd, const String *wild, Item *where_cond) |
Query_block * | build_show_global_variables (const POS &pos, THD *thd, const String *wild, Item *where_cond) |
|
static |
Build a replacement query for SHOW STATUS.
When the parser accepts the following syntax:
SHOW GLOBAL STATUS
the parsed tree built for this query is in fact:
SELECT * FROM (SELECT VARIABLE_NAME as Variable_name, VARIABLE_VALUE as Value FROM performance_schema.global_status) global_status
Likewise, the query:
SHOW GLOBAL STATUS LIKE "<value>"
is built as:
SELECT * FROM (SELECT VARIABLE_NAME as Variable_name, VARIABLE_VALUE as Value FROM performance_schema.global_status) global_status WHERE Variable_name LIKE "<value>"
Likewise, the query:
SHOW GLOBAL STATUS where <where_clause>
is built as:
SELECT * FROM (SELECT VARIABLE_NAME as Variable_name, VARIABLE_VALUE as Value FROM performance_schema.global_status) global_status WHERE <where_clause>
Query_block * build_show_global_status | ( | const POS & | pos, |
THD * | thd, | ||
const String * | wild, | ||
Item * | where_cond | ||
) |
Query_block * build_show_global_variables | ( | const POS & | pos, |
THD * | thd, | ||
const String * | wild, | ||
Item * | where_cond | ||
) |
Query_block * build_show_session_status | ( | const POS & | pos, |
THD * | thd, | ||
const String * | wild, | ||
Item * | where_cond | ||
) |
Query_block * build_show_session_variables | ( | const POS & | pos, |
THD * | thd, | ||
const String * | wild, | ||
Item * | where_cond | ||
) |