MySQL 8.0.39
Source Code Documentation
st_lex_local Struct Reference

#include <sql_lex.h>

Inheritance diagram for st_lex_local:
[legend]

Static Public Member Functions

static void * operator new (size_t size) noexcept
 
static void * operator new (size_t size, MEM_ROOT *mem_root, const std::nothrow_t &arg=std::nothrow) noexcept
 
static void operator delete (void *ptr, size_t size)
 
static void operator delete (void *, MEM_ROOT *, const std::nothrow_t &) noexcept
 
- Static Public Member Functions inherited from Query_tables_list
static const char * stmt_accessed_table_string (enum_stmt_accessed_table accessed_table)
 

Additional Inherited Members

- Public Types inherited from LEX
typedef Prealloced_array< plugin_ref, INITIAL_LEX_PLUGIN_LIST_SIZEPlugins_array
 
- Public Types inherited from Query_tables_list
enum  { START_SROUTINES_HASH_SIZE = 16 }
 
enum  enum_lock_tables_state { LTS_NOT_LOCKED = 0 , LTS_LOCKED }
 Locking state of tables in this particular statement. More...
 
enum  enum_binlog_stmt_unsafe {
  BINLOG_STMT_UNSAFE_LIMIT = 0 , BINLOG_STMT_UNSAFE_SYSTEM_TABLE , BINLOG_STMT_UNSAFE_AUTOINC_COLUMNS , BINLOG_STMT_UNSAFE_UDF ,
  BINLOG_STMT_UNSAFE_SYSTEM_VARIABLE , BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION , BINLOG_STMT_UNSAFE_NONTRANS_AFTER_TRANS , BINLOG_STMT_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE ,
  BINLOG_STMT_UNSAFE_MIXED_STATEMENT , BINLOG_STMT_UNSAFE_INSERT_IGNORE_SELECT , BINLOG_STMT_UNSAFE_INSERT_SELECT_UPDATE , BINLOG_STMT_UNSAFE_WRITE_AUTOINC_SELECT ,
  BINLOG_STMT_UNSAFE_REPLACE_SELECT , BINLOG_STMT_UNSAFE_CREATE_IGNORE_SELECT , BINLOG_STMT_UNSAFE_CREATE_REPLACE_SELECT , BINLOG_STMT_UNSAFE_CREATE_SELECT_AUTOINC ,
  BINLOG_STMT_UNSAFE_UPDATE_IGNORE , BINLOG_STMT_UNSAFE_INSERT_TWO_KEYS , BINLOG_STMT_UNSAFE_AUTOINC_NOT_FIRST , BINLOG_STMT_UNSAFE_FULLTEXT_PLUGIN ,
  BINLOG_STMT_UNSAFE_SKIP_LOCKED , BINLOG_STMT_UNSAFE_NOWAIT , BINLOG_STMT_UNSAFE_XA , BINLOG_STMT_UNSAFE_DEFAULT_EXPRESSION_IN_SUBSTATEMENT ,
  BINLOG_STMT_UNSAFE_ACL_TABLE_READ_IN_DML_DDL , BINLOG_STMT_UNSAFE_CREATE_SELECT_WITH_GIPK , BINLOG_STMT_UNSAFE_COUNT
}
 All types of unsafe statements. More...
 
enum  enum_stmt_accessed_table {
  STMT_READS_TRANS_TABLE = 0 , STMT_READS_NON_TRANS_TABLE , STMT_READS_TEMP_TRANS_TABLE , STMT_READS_TEMP_NON_TRANS_TABLE ,
  STMT_WRITES_TRANS_TABLE , STMT_WRITES_NON_TRANS_TABLE , STMT_WRITES_TEMP_TRANS_TABLE , STMT_WRITES_TEMP_NON_TRANS_TABLE ,
  STMT_ACCESS_TABLE_COUNT
}
 
- Public Member Functions inherited from LEX
Query_blockcurrent_query_block () const
 
void assert_ok_set_current_query_block ()
 
void set_current_query_block (Query_block *select)
 
bool is_explain () const
 
bool using_hypergraph_optimizer () const
 Whether the currently-running query should be (attempted) executed in the hypergraph optimizer. More...
 
void set_using_hypergraph_optimizer (bool use_hypergraph)
 
bool locate_var_assignment (const Name_string &name)
 Locate an assignment to a user variable with a given name, within statement. More...
 
void insert_values_map (Item_field *f1, Field *f2)
 
void destroy_values_map ()
 
void clear_values_map ()
 
bool has_values_map () const
 
std::map< Item_field *, Field * >::iterator begin_values_map ()
 
std::map< Item_field *, Field * >::iterator end_values_map ()
 
bool is_ignore () const
 
void set_ignore (bool ignore_param)
 
void set_has_udf ()
 
bool has_udf () const
 
ulonglong statement_options ()
 Gets the options that have been set for this statement. More...
 
void add_statement_options (ulonglong options)
 Add options to values of m_statement_options. More...
 
bool is_broken () const
 
void mark_broken (bool broken=true)
 Certain permanent transformations (like in2exists), if they fail, may leave the LEX in an inconsistent state. More...
 
bool check_preparation_invalid (THD *thd)
 Check whether preparation state for prepared statement is invalid. More...
 
void cleanup (bool full)
 
bool is_exec_started () const
 
void set_exec_started ()
 
void reset_exec_started ()
 
bool is_exec_completed () const
 Check whether the statement has been executed (regardless of completion - successful or in error). More...
 
void set_exec_completed ()
 
sp_pcontextget_sp_current_parsing_ctx ()
 
void set_sp_current_parsing_ctx (sp_pcontext *ctx)
 
bool is_metadata_used () const
 Check if the current statement uses meta-data (uses a table or a stored routine). More...
 
bool deny_window_function (Query_block *qb) const
 We have detected the presence of an alias of a window function with a window on query block qb. More...
 
 LEX ()
 
virtual ~LEX ()
 
void destroy ()
 Destroy contained objects, but not the LEX object itself. More...
 
void reset ()
 Reset query context to initial state. More...
 
Query_blocknew_empty_query_block ()
 Create an empty query block within this LEX object. More...
 
Query_blocknew_query (Query_block *curr_query_block)
 Create query expression object that contains one query block. More...
 
Query_blocknew_set_operation_query (Query_block *curr_query_block)
 Create query block and attach it to the current query expression. More...
 
bool new_top_level_query ()
 Create top-level query expression and query block. More...
 
void new_static_query (Query_expression *sel_query_expression, Query_block *select)
 Create query expression and query block in existing memory objects. More...
 
Query_expressioncreate_query_expr_and_block (THD *thd, Query_block *current_query_block, Item *where_clause, Item *having_clause, enum_parsing_context ctx)
 Create query expression under current_query_block and a query block under the new query expression. More...
 
bool is_ps_or_view_context_analysis ()
 
bool is_view_context_analysis ()
 
void clear_execution ()
 Clear execution state for a statement after it has been prepared or executed, and before it is (re-)executed. More...
 
void set_uncacheable (Query_block *curr_query_block, uint8 cause)
 Set the current query as uncacheable. More...
 
void set_trg_event_type_for_tables ()
 Set the initial purpose of this Table_ref object in the list of used tables. More...
 
Table_refunlink_first_table (bool *link_to_local)
 
void link_first_table_back (Table_ref *first, bool link_to_local)
 
void first_lists_tables_same ()
 
void restore_cmd_properties ()
 
void restore_properties_for_insert ()
 
bool save_cmd_properties (THD *thd)
 
bool can_use_merged ()
 check if command can use VIEW with MERGE algorithm (for top VIEWs) More...
 
bool can_not_use_merged ()
 Check if command can't use merged views in any part of command. More...
 
bool need_correct_ident ()
 
bool which_check_option_applicable ()
 
void cleanup_after_one_table_open ()
 
bool push_context (Name_resolution_context *context)
 
void pop_context ()
 
bool copy_db_to (char const **p_db, size_t *p_db_length) const
 This method should be called only during parsing. More...
 
bool copy_db_to (char **p_db, size_t *p_db_length) const
 
Name_resolution_contextcurrent_context ()
 
void reset_n_backup_query_tables_list (Query_tables_list *backup)
 
void restore_backup_query_tables_list (Query_tables_list *backup)
 
bool table_or_sp_used ()
 
bool is_single_level_stmt ()
 check if the statement is a single-level join More...
 
void release_plugins ()
 
bool accept (Select_lex_visitor *visitor)
 
bool set_wild (LEX_STRING)
 
void clear_privileges ()
 
bool make_sql_cmd (Parse_tree_root *parse_tree)
 Uses parse_tree to instantiate an Sql_cmd object and assigns it to the Lex. More...
 
Secondary_engine_execution_contextsecondary_engine_execution_context () const
 Gets the secondary engine execution context for this statement. More...
 
void set_secondary_engine_execution_context (Secondary_engine_execution_context *context)
 Sets the secondary engine execution context for this statement. More...
 
bool is_replication_deprecated_syntax_used ()
 
void set_replication_deprecated_syntax_used ()
 
bool was_replication_command_executed () const
 
void set_was_replication_command_executed ()
 
bool set_channel_name (LEX_CSTRING name={})
 Set replication channel name. More...
 
void set_rewrite_required ()
 
void reset_rewrite_required ()
 
bool is_rewrite_required ()
 
- Public Member Functions inherited from Query_tables_list
Query_tables_listoperator= (Query_tables_list &&)=default
 
bool is_query_tables_locked () const
 
 Query_tables_list ()=default
 
 ~Query_tables_list ()=default
 
void reset_query_tables_list (bool init)
 
void destroy_query_tables_list ()
 
void set_query_tables_list (Query_tables_list *state)
 
void add_to_query_tables (Table_ref *table)
 
bool requires_prelocking ()
 
void mark_as_requiring_prelocking (Table_ref **tables_own_last)
 
Table_reffirst_not_own_table ()
 
void chop_off_not_own_tables ()
 
bool is_stmt_unsafe () const
 Determine if this statement is marked as unsafe. More...
 
bool is_stmt_unsafe (enum_binlog_stmt_unsafe unsafe)
 
void set_stmt_unsafe (enum_binlog_stmt_unsafe unsafe_type)
 Flag the current (top-level) statement as unsafe. More...
 
void set_stmt_unsafe_flags (uint32 flags)
 Set the bits of binlog_stmt_flags determining the type of unsafeness of the current statement. More...
 
uint32 get_stmt_unsafe_flags () const
 Return a binary combination of all unsafe warnings for the statement. More...
 
bool is_stmt_row_injection () const
 Determine if this statement is a row injection. More...
 
void set_stmt_row_injection ()
 Flag the statement as a row injection. More...
 
void set_stmt_accessed_table (enum_stmt_accessed_table accessed_table)
 Sets the type of table that is about to be accessed while executing a statement. More...
 
bool stmt_accessed_table (enum_stmt_accessed_table accessed_table)
 Checks if a type of table is about to be accessed while executing a statement. More...
 
bool is_mixed_stmt_unsafe (bool in_multi_stmt_transaction_mode, bool binlog_direct, bool trx_cache_is_not_empty, uint tx_isolation)
 
bool uses_stored_routines () const
 true if the parsed tree contains references to stored procedures or functions, false otherwise More...
 
void set_using_match ()
 
bool get_using_match ()
 
void set_stmt_unsafe_with_mixed_mode ()
 
bool is_stmt_unsafe_with_mixed_mode () const
 
- Public Attributes inherited from LEX
Query_expressionunit
 Outer-most query expression. More...
 
Query_blockquery_block
 First query block. More...
 
Query_blockall_query_blocks_list
 List of all query blocks. More...
 
bool is_explain_analyze = false
 
LEX_STRING name
 
char * help_arg
 
char * to_log
 
const char * x509_subject
 
const char * x509_issuer
 
const char * ssl_cipher
 
Stringwild
 
Query_resultresult
 
LEX_STRING binlog_stmt_arg
 Argument of the BINLOG event statement. More...
 
LEX_STRING ident
 
LEX_USERgrant_user
 
LEX_ALTER alter_password
 
enum_alter_user_attribute alter_user_attribute
 
LEX_STRING alter_user_comment_text
 
LEX_GRANT_AS grant_as
 
THDthd
 
Opt_hints_globalopt_hints_global
 
Plugins_array plugins
 
Table_refinsert_table
 Table being inserted into (may be a view) More...
 
Table_refinsert_table_leaf
 Leaf table being inserted into (always a base table) More...
 
LEX_STRING create_view_query_block
 SELECT of CREATE VIEW statement. More...
 
partition_infopart_info
 
LEX_USERdefiner
 
List< LEX_USERusers_list
 
List< LEX_COLUMNcolumns
 
List< LEX_CSTRINGdynamic_privileges
 
List< LEX_USER > * default_roles
 
ulonglong bulk_insert_row_cnt
 
List< Itempurge_value_list
 
List< Itemkill_value_list
 
List< set_var_basevar_list
 
List< Item_func_set_user_varset_var_list
 
List< Item_paramparam_list
 List of placeholders ('?') for parameters of a prepared statement. More...
 
List< Name_resolution_contextcontext_stack
 
Item_sumin_sum_func
 
udf_func udf
 
HA_CHECK_OPT check_opt
 
HA_CREATE_INFOcreate_info
 
KEY_CREATE_INFO key_create_info
 
LEX_MASTER_INFO mi
 
LEX_SLAVE_CONNECTION slave_connection
 
Server_options server_options
 
USER_RESOURCES mqh
 
LEX_RESET_SLAVE reset_slave_info
 
ulong type
 
nesting_map allow_sum_func
 This field is used as a work field during resolving to validate the use of aggregate functions. More...
 
nesting_map m_deny_window_func
 Windowing functions are not allowed in HAVING - in contrast to grouped aggregate functions, since windowing in SQL logically follows after all grouping operations. More...
 
bool m_subquery_to_derived_is_impossible
 If true: during prepare, we did a subquery transformation (IN-to-EXISTS, SOME/ANY) that doesn't currently work for subquery to a derived table transformation. More...
 
Sql_cmdm_sql_cmd
 
bool expr_allows_subquery {true}
 
uint reparse_common_table_expr_at
 If currently re-parsing a CTE's definition, this is the offset in bytes of that definition in the original statement which had the WITH clause. More...
 
bool reparse_derived_table_condition {false}
 If currently re-parsing a condition which is pushed down to a derived table, this will be set to true. More...
 
std::vector< uintreparse_derived_table_params_at
 If currently re-parsing a condition that is being pushed down to a derived table, this has the positions of all the parameters that are part of that condition in the original statement. More...
 
enum SSL_type ssl_type
 
enum enum_duplicates duplicates
 
enum enum_tx_isolation tx_isolation
 
enum enum_var_type option_type
 
enum_view_create_mode create_view_mode
 
my_thread_id show_profile_query_id
 QUERY ID for SHOW PROFILE. More...
 
uint profile_options
 
uint grant
 
uint grant_tot_col
 
bool grant_privilege
 Set to true when GRANT ... GRANT OPTION ... TO ... is used (vs. More...
 
uint slave_thd_opt
 
uint start_transaction_opt
 
int select_number
 Number of query block (by EXPLAIN) More...
 
uint8 create_view_algorithm
 
uint8 create_view_check
 
uint8 context_analysis_only
 
bool drop_if_exists
 
bool grant_if_exists
 refers to optional IF EXISTS clause in REVOKE sql. More...
 
bool ignore_unknown_user
 refers to optional IGNORE UNKNOWN USER clause in REVOKE sql. More...
 
bool drop_temporary
 
bool autocommit
 
bool verbose
 
bool no_write_to_binlog
 
bool m_extended_show
 
enum enum_yes_no_unknown tx_chain tx_release
 
bool safe_to_cache_query
 Whether this query will return the same answer every time, given unchanged data. More...
 
st_parsing_options parsing_options
 
Alter_infoalter_info
 
LEX_CSTRING prepared_stmt_name
 
LEX_STRING prepared_stmt_code
 
bool prepared_stmt_code_is_varref
 
List< LEX_STRINGprepared_stmt_params
 
sp_headsphead
 
sp_namespname
 
bool sp_lex_in_use
 
bool all_privileges
 
bool contains_plaintext_password
 
enum_keep_diagnostics keep_diagnostics
 
uint32 next_binlog_file_nr
 
st_sp_chistics sp_chistics
 
Event_parse_dataevent_parse_data
 
bool only_view
 
uint8 create_view_suid
 
const char * stmt_definition_begin
 Intended to point to the next word after DEFINER-clause in the following statements: More...
 
const char * stmt_definition_end
 
bool use_only_table_context
 During name resolution search only in the table list given by Name_resolution_context::first_name_resolution_table and Name_resolution_context::last_name_resolution_table (see Item_field::fix_fields()). More...
 
bool is_lex_started
 
bool in_update_value_clause
 Set to true while resolving values in ON DUPLICATE KEY UPDATE clause. More...
 
class Explain_formatexplain_format
 
ulong max_execution_time
 
bool binlog_need_explicit_defaults_ts
 
bool will_contextualize
 Used to inform the parser whether it should contextualize the parse tree. More...
 
dd::info_schema::Table_statistics m_IS_table_stats
 IS schema queries read some dynamic table statistics from SE. More...
 
dd::info_schema::Tablespace_statistics m_IS_tablespace_stats
 
- Public Attributes inherited from Query_tables_list
enum_sql_command sql_command
 SQL command for this statement. More...
 
Table_refquery_tables
 
Table_ref ** query_tables_last
 
Table_ref ** query_tables_own_last
 
std::unique_ptr< malloc_unordered_map< std::string, Sroutine_hash_entry * > > sroutines
 
SQL_I_List< Sroutine_hash_entrysroutines_list
 
Sroutine_hash_entry ** sroutines_list_own_last
 
uint sroutines_list_own_elements
 
enum_lock_tables_state lock_tables_state
 
uint table_count
 Number of tables which were open by open_tables() and to be locked by lock_tables(). More...
 
- Static Public Attributes inherited from Query_tables_list
static const int BINLOG_STMT_UNSAFE_ALL_FLAGS
 This has all flags from 0 (inclusive) to BINLOG_STMT_FLAG_COUNT (exclusive) set. More...
 
static const int binlog_stmt_unsafe_errcode [BINLOG_STMT_UNSAFE_COUNT]
 Maps elements of enum_binlog_stmt_unsafe to error codes. More...
 

Member Function Documentation

◆ operator delete() [1/2]

static void st_lex_local::operator delete ( void *  ,
MEM_ROOT ,
const std::nothrow_t &   
)
inlinestaticnoexcept

◆ operator delete() [2/2]

static void st_lex_local::operator delete ( void *  ptr,
size_t  size 
)
inlinestatic

◆ operator new() [1/2]

static void * st_lex_local::operator new ( size_t  size)
inlinestaticnoexcept

◆ operator new() [2/2]

static void * st_lex_local::operator new ( size_t  size,
MEM_ROOT mem_root,
const std::nothrow_t &  arg = std::nothrow 
)
inlinestaticnoexcept

The documentation for this struct was generated from the following file: