MySQL 9.1.0
Source Code Documentation
|
#include <stddef.h>
#include "sql/sql_show_processlist.h"
#include "lex_string.h"
#include "sql/auth/auth_acls.h"
#include "sql/debug_sync.h"
#include "sql/item_cmpfunc.h"
#include "sql/item_func.h"
#include "sql/mem_root_array.h"
#include "sql/parse_tree_items.h"
#include "sql/parse_tree_nodes.h"
#include "sql/sql_class.h"
#include "sql/sql_const.h"
#include "sql/sql_lex.h"
#include "sql/sql_parse.h"
#include "sql/strfunc.h"
#include "sql_string.h"
#include "string_with_len.h"
Functions | |
static bool | add_expression (const POS &pos, THD *thd, PT_select_item_list *item_list, const LEX_CSTRING &field, const LEX_CSTRING &alias) |
Build a replacement query for SHOW PROCESSLIST. More... | |
bool | build_processlist_query (const POS &pos, THD *thd, bool verbose) |
|
static |
Build a replacement query for SHOW PROCESSLIST.
When the parser accepts the following syntax:
SHOW [FULL] PROCESSLIST
the parsed tree built for this query is in fact:
SELECT * FROM (SELECT ID Id, USER User, HOST Host, DB db, COMMAND Command, TIME Time, STATE State, LEFT(INFO, <info_len>) Info FROM performance_schema.processlist) AS show_processlist;
where info_len
is 100 by default, otherwise 1024 for FULL PROCESSLIST.
MAINTAINER: This code builds a parsed tree for a query. Write the query to build in SQL first, then see turn_parser_debug_on() in sql_yacc.yy to understand which grammar actions are needed to build a parsed tree for this SQL query.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
bool pfs_processlist_enabled = false |
Implement SHOW PROCESSLIST by using performance schema.processlist.
|
static |