MySQL 8.4.3
Source Code Documentation
|
#include <string.h>
#include <sys/types.h>
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <functional>
#include <map>
#include <memory>
#include <new>
#include <string>
#include <utility>
#include "lex_string.h"
#include "map_helpers.h"
#include "mem_root_deque.h"
#include "memory_debugging.h"
#include "my_alloc.h"
#include "my_base.h"
#include "my_compiler.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_sqlcommand.h"
#include "my_sys.h"
#include "my_table_map.h"
#include "my_thread_local.h"
#include "mysql/components/services/bits/psi_bits.h"
#include "mysql/service_mysql_alloc.h"
#include "mysql/strings/m_ctype.h"
#include "mysql_com.h"
#include "mysqld_error.h"
#include "prealloced_array.h"
#include "sql/dd/info_schema/table_stats.h"
#include "sql/dd/info_schema/tablespace_stats.h"
#include "sql/enum_query_type.h"
#include "sql/handler.h"
#include "sql/item.h"
#include "sql/item_subselect.h"
#include "sql/iterators/row_iterator.h"
#include "sql/join_optimizer/materialize_path_parameters.h"
#include "sql/key_spec.h"
#include "sql/mdl.h"
#include "sql/mem_root_array.h"
#include "sql/parse_location.h"
#include "sql/parse_tree_node_base.h"
#include "sql/parser_yystype.h"
#include "sql/query_options.h"
#include "sql/query_term.h"
#include "sql/set_var.h"
#include "sql/sql_array.h"
#include "sql/sql_connect.h"
#include "sql/sql_const.h"
#include "sql/sql_data_change.h"
#include "sql/sql_error.h"
#include "sql/sql_list.h"
#include "sql/sql_plugin_ref.h"
#include "sql/sql_servers.h"
#include "sql/sql_udf.h"
#include "sql/table.h"
#include "sql/thr_malloc.h"
#include "sql/trigger_def.h"
#include "sql/visible_fields.h"
#include "sql_string.h"
#include "string_with_len.h"
#include "strings/sql_chars.h"
#include "thr_lock.h"
#include "violite.h"
Go to the source code of this file.
Classes | |
class | Table_ident |
struct | LEX_SOURCE_INFO |
Structure to hold parameters for CHANGE REPLICATION SOURCE, START REPLICA, and STOP REPLICA. More... | |
struct | LEX_RESET_REPLICA |
class | Index_hint |
class | Query_expression |
This class represents a query expression (one query block or several query blocks combined with UNION). More... | |
class | Query_block |
This class represents a query block, aka a query specification, which is a query consisting of a SELECT keyword, followed by a table list, optionally followed by a WHERE clause, a GROUP BY, etc. More... | |
class | Condition_context |
Utility RAII class to save/modify/restore the condition_context information of a query block. More... | |
class | Secondary_engine_execution_context |
Base class for secondary engine execution context objects. More... | |
struct | struct_replica_connection |
struct | st_sp_chistics |
struct | st_trg_chistics |
class | Query_tables_list |
struct | st_parsing_options |
class | Lex_input_stream |
This class represents the character input stream consumed during lexical analysis. More... | |
class | LEX_COLUMN |
class | LEX_GRANT_AS |
struct | LEX |
The LEX object currently serves three different purposes: More... | |
class | Prepare_error_tracker |
RAII class to ease the call of LEX::mark_broken() if error. More... | |
class | Yacc_state |
The internal state of the syntax parser. More... | |
struct | Parser_input |
Input parameters to the parser. More... | |
class | Parser_state |
Internal state of the parser. More... | |
class | Partition_expr_parser_state |
Parser state for partition expression parser (.frm/DD stuff) More... | |
class | Gcol_expr_parser_state |
Parser state for generated column expression parser (.frm/DD stuff) More... | |
class | Expression_parser_state |
Parser state for single expression parser (.frm/DD stuff) More... | |
class | Common_table_expr_parser_state |
Parser state for CTE subquery parser. More... | |
class | Derived_expr_parser_state |
Parser state for Derived table's condition parser. More... | |
struct | st_lex_local |
Macros | |
#define | TYPE_ENUM_FUNCTION 1 |
#define | TYPE_ENUM_PROCEDURE 2 |
#define | TYPE_ENUM_TRIGGER 3 |
#define | TYPE_ENUM_PROXY 4 |
#define | TL_OPTION_UPDATING 0x01 |
#define | TL_OPTION_IGNORE_LEAVES 0x02 |
#define | TL_OPTION_ALIAS 0x04 |
#define | INDEX_HINT_MASK_JOIN (1) |
#define | INDEX_HINT_MASK_GROUP (1 << 1) |
#define | INDEX_HINT_MASK_ORDER (1 << 2) |
#define | INDEX_HINT_MASK_ALL (INDEX_HINT_MASK_JOIN | INDEX_HINT_MASK_GROUP | INDEX_HINT_MASK_ORDER) |
#define | BINLOG_DIRECT_ON |
#define | BINLOG_DIRECT_OFF |
#define | TRX_CACHE_EMPTY 0x33 /* unsafe when trx-cache is empty */ |
#define | TRX_CACHE_NOT_EMPTY 0xCC /* unsafe when trx-cache is not empty */ |
#define | IL_LT_REPEATABLE 0xAA /* unsafe when < ISO_REPEATABLE_READ */ |
#define | IL_GTE_REPEATABLE 0x55 /* unsafe when >= ISO_REPEATABLE_READ */ |
Typedefs | |
using | List_item = mem_root_deque< Item * > |
using | Group_list_ptrs = Mem_root_array< ORDER * > |
typedef uchar | index_clause_map |
typedef Bounds_checked_array< Item * > | Ref_item_array |
typedef struct struct_replica_connection | LEX_REPLICA_CONNECTION |
Functions | |
void | binlog_unsafe_map_init () |
enum_sp_type | to_sp_type (longlong val) |
longlong | to_longlong (enum_sp_type val) |
uint | to_uint (enum_sp_type val) |
bool | walk_join_list (mem_root_deque< Table_ref * > &list, std::function< bool(Table_ref *)> action) |
void | lex_free (void) |
bool | lex_start (THD *thd) |
Call lex_start() before every query that is to be prepared and executed. More... | |
void | lex_end (LEX *lex) |
Call this function after preparation and execution of a query. More... | |
int | my_sql_parser_lex (MY_SQL_PARSER_STYPE *, POS *, class THD *) |
yylex() function implementation for the main parser More... | |
void | trim_whitespace (const CHARSET_INFO *cs, LEX_STRING *str) |
bool | is_lex_native_function (const LEX_STRING *name) |
Check if name is a sql function. More... | |
bool | is_keyword (const char *name, size_t len) |
bool | db_is_default_db (const char *db, size_t db_len, const THD *thd) |
bool | check_select_for_locking_clause (THD *) |
void | print_derived_column_names (const THD *thd, String *str, const Create_col_name_list *column_names) |
Prints into 'str' a comma-separated list of column names, enclosed in parenthesis. More... | |
bool | is_invalid_string (const LEX_CSTRING &string_val, const CHARSET_INFO *charset_info) |
(End of group GROUP_PARSER) More... | |
bool | is_invalid_string (const LEX_CSTRING &string_val, const CHARSET_INFO *charset_info, std::string &invalid_sub_str) |
Check if the given string is invalid using the system charset. More... | |
void | assert_consistent_hidden_flags (const mem_root_deque< Item * > &fields, Item *item, bool hidden) |
In debug mode, verify that we're not adding an item twice to the fields list with inconsistent hidden flags. More... | |
bool | walk_item (Item *item, Select_lex_visitor *visitor) |
bool | accept_for_order (SQL_I_List< ORDER > orders, Select_lex_visitor *visitor) |
bool | accept_table (Table_ref *t, Select_lex_visitor *visitor) |
bool | accept_for_join (mem_root_deque< Table_ref * > *tables, Select_lex_visitor *visitor) |
Table_ref * | nest_join (THD *thd, Query_block *select, Table_ref *embedding, mem_root_deque< Table_ref * > *jlist, size_t table_cnt, const char *legend) |
Plumbing for nest_last_join, q.v. More... | |
void | get_select_options_str (ulonglong options, std::string *str) |
Variables | |
const size_t | INITIAL_LEX_PLUGIN_LIST_SIZE = 16 |
constexpr const int | MAX_SELECT_NESTING {sizeof(nesting_map) * 8 - 1} |
uint | binlog_unsafe_map [256] |
const LEX_CSTRING | sp_data_access_name [] |
const char * | index_hint_type_name [] |
const LEX_STRING | null_lex_str |
LEX_STRING constant for null-string to be used in parser and other places. More... | |
#define BINLOG_DIRECT_OFF |
#define BINLOG_DIRECT_ON |
#define IL_GTE_REPEATABLE 0x55 /* unsafe when >= ISO_REPEATABLE_READ */ |
#define IL_LT_REPEATABLE 0xAA /* unsafe when < ISO_REPEATABLE_READ */ |
#define TRX_CACHE_EMPTY 0x33 /* unsafe when trx-cache is empty */ |
#define TRX_CACHE_NOT_EMPTY 0xCC /* unsafe when trx-cache is not empty */ |
bool accept_for_join | ( | mem_root_deque< Table_ref * > * | tables, |
Select_lex_visitor * | visitor | ||
) |
bool accept_for_order | ( | SQL_I_List< ORDER > | orders, |
Select_lex_visitor * | visitor | ||
) |
bool accept_table | ( | Table_ref * | t, |
Select_lex_visitor * | visitor | ||
) |
|
inline |
In debug mode, verify that we're not adding an item twice to the fields list with inconsistent hidden flags.
Must be called before adding the item to fields.
void get_select_options_str | ( | ulonglong | options, |
std::string * | str | ||
) |
|
inline |
(End of group GROUP_PARSER)
Check if the given string is invalid using the system charset.
string_val | Reference to the string. |
charset_info | Pointer to charset info. |
|
inline |
Check if the given string is invalid using the system charset.
string_val | Reference to the string. | |
charset_info | Pointer to charset info. | |
[out] | invalid_sub_str | If string has an invalid encoding then invalid string in printable ASCII format is stored. |
bool walk_item | ( | Item * | item, |
Select_lex_visitor * | visitor | ||
) |