MySQL 8.0.39
Source Code Documentation
|
#include <assert.h>
#include <sys/types.h>
#include <new>
#include "lex_string.h"
#include "m_ctype.h"
#include "my_inttypes.h"
#include "mysql_time.h"
#include "sql/item.h"
#include "sql/item_func.h"
#include "sql/parse_location.h"
#include "sql/parse_tree_node_base.h"
#include "sql/resourcegroups/resource_group_basic_types.h"
#include "sql/set_var.h"
#include "sql/sql_error.h"
#include "sql/sql_list.h"
Go to the source code of this file.
Classes | |
class | Parse_tree_item |
Base class for parse-time Item objects. More... | |
class | PT_item_list |
Wrapper class for an Item list head, used to allocate Item lists in the parser in a context-independent way. More... | |
Functions | |
template<typename Context , typename Array > | |
bool | contextualize_array (Context *pc, Array *array) |
Contextualize a Mem_root_array of parse tree nodes of the type PTN. More... | |
template<class To , Item_func::Functype Tag> | |
To * | item_cond_cast (Item *const from) |
Helper function to imitate dynamic_cast for Item_cond hierarchy. More... | |
template<class Class , Item_func::Functype Tag> | |
Item * | flatten_associative_operator (MEM_ROOT *mem_root, const POS &pos, Item *left, Item *right) |
Flatten associative operators at parse time. More... | |
Item_splocal * | create_item_for_sp_var (THD *thd, LEX_CSTRING name, class sp_variable *spv, const char *query_start_ptr, const char *start, const char *end) |
Create an object to represent a SP variable in the Item-hierarchy. More... | |
LEX_CSTRING | make_string (THD *thd, const char *start_ptr, const char *end_ptr) |
Make a new string allocated on THD's mem-root. More... | |
void | sp_create_assignment_lex (THD *thd, const char *option_ptr) |
bool | sp_create_assignment_instr (THD *thd, const char *expr_end_ptr) |
Create a SP instruction for a SET assignment. More... | |
bool | resolve_engine (THD *thd, const LEX_CSTRING &name, bool is_temp_table, bool strict, handlerton **ret) |
Resolve engine by its name. More... | |
bool | apply_privileges (THD *thd, const Mem_root_array< class PT_role_or_privilege * > &privs) |
This helper function is responsible for aggregating grants from parser tokens to containers and masks which can be used during semantic analysis. More... | |
bool | is_identifier (const char *str, const char *ident) |
bool | is_identifier (const LEX_STRING &str, const char *ident) |
bool | validate_vcpu_range (const resourcegroups::Range &range) |
bool | validate_resource_group_priority (THD *thd, int *priority, const LEX_CSTRING &name, const resourcegroups::Type &type) |
bool | check_resource_group_support () |
bool | check_resource_group_name_len (const LEX_CSTRING &name, Sql_condition::enum_severity_level severity) |
void | move_cf_appliers (Parse_context *tddlpc, Column_parse_context *cpc) |
bool apply_privileges | ( | THD * | thd, |
const Mem_root_array< class PT_role_or_privilege * > & | privs | ||
) |
This helper function is responsible for aggregating grants from parser tokens to containers and masks which can be used during semantic analysis.
thd | The thread handler |
privs | A list of parser tokens representing roles or privileges. |
true | An error occurred |
false | Success |
bool check_resource_group_name_len | ( | const LEX_CSTRING & | name, |
Sql_condition::enum_severity_level | severity | ||
) |
bool check_resource_group_support | ( | ) |
bool contextualize_array | ( | Context * | pc, |
Array * | array | ||
) |
Contextualize a Mem_root_array of parse tree nodes of the type PTN.
Context | Parse context. |
Array | Array of parse tree nodes. |
[in,out] | pc | Parse context. |
[in,out] | array | Array of nodes to contextualize. |
Item_splocal * create_item_for_sp_var | ( | THD * | thd, |
LEX_CSTRING | name, | ||
sp_variable * | spv, | ||
const char * | query_start_ptr, | ||
const char * | start, | ||
const char * | end | ||
) |
Create an object to represent a SP variable in the Item-hierarchy.
thd | The current thread. |
name | The SP variable name. |
spv | The SP variable (optional). |
query_start_ptr | Start of the SQL-statement query string (optional). |
start | Start position of the SP variable name in the query. |
end | End position of the SP variable name in the query. |
Item * flatten_associative_operator | ( | MEM_ROOT * | mem_root, |
const POS & | pos, | ||
Item * | left, | ||
Item * | right | ||
) |
Flatten associative operators at parse time.
This function flattens AND and OR operators at parse time if applicable, otherwise it creates new Item_cond_and or Item_cond_or respectively.
Template parameter Class
is Item_cond_and
or Item_cond_or
Template parameter Tag
is COND_AND_FUNC
(for Item_cond_and
) or COND_OR_FUNC
otherwise
mem_root | MEM_ROOT |
pos | parse location |
left | left argument of the operator |
right | right argument of the operator |
|
inline |
|
inline |
To * item_cond_cast | ( | Item *const | from | ) |
Helper function to imitate dynamic_cast for Item_cond hierarchy.
Template parameter To
is the destination type (Item_cond_and
etc.) Template parameter Tag
is the Functype tag to compare from->functype() with
from | source item |
LEX_CSTRING make_string | ( | THD * | thd, |
const char * | start_ptr, | ||
const char * | end_ptr | ||
) |
Make a new string allocated on THD's mem-root.
thd | thread handler. |
start_ptr | start of the new string. |
end_ptr | end of the new string. |
void move_cf_appliers | ( | Parse_context * | tddlpc, |
Column_parse_context * | cpc | ||
) |
bool resolve_engine | ( | THD * | thd, |
const LEX_CSTRING & | name, | ||
bool | is_temp_table, | ||
bool | strict, | ||
handlerton ** | ret | ||
) |
Resolve engine by its name.
thd | Thread handler. | |
name | Engine's name. | |
is_temp_table | True if temporary table. | |
strict | Force error if engine is unknown(*). | |
[out] | ret | Engine object or NULL(**). |
strict
parameter. strict
if false and engine is unknown, the function outputs a warning, sets ret
to NULL and returns false (success). bool sp_create_assignment_instr | ( | THD * | thd, |
const char * | expr_end_ptr | ||
) |
Create a SP instruction for a SET assignment.
thd | Thread context |
expr_end_ptr | Option-value-expression end pointer |
void sp_create_assignment_lex | ( | THD * | thd, |
const char * | option_ptr | ||
) |
bool validate_resource_group_priority | ( | THD * | thd, |
int * | priority, | ||
const LEX_CSTRING & | name, | ||
const resourcegroups::Type & | type | ||
) |
bool validate_vcpu_range | ( | const resourcegroups::Range & | range | ) |