91#define PARS_NOT_PARAM 2
286 void *not_fit_in_memory);
372 const uint32_t *val);
380 const uint64_t *val);
428 const uint64_t *val);
598#define PARS_FUNC_ARITH 1
599#define PARS_FUNC_LOGICAL 2
600#define PARS_FUNC_CMP 3
601#define PARS_FUNC_PREDEFINED 4
602#define PARS_FUNC_AGGREGATE 5
603#define PARS_FUNC_OTHER \
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1105
Definition: buf0block_hint.cc:30
constexpr value_type is_unsigned
Definition: classic_protocol_constants.h:273
constexpr value_type for_update
Definition: classic_protocol_constants.h:214
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
pars_res_word_t pars_instr_token
Definition: pars0pars.cc:71
que_node_t * pars_cursor_declaration(sym_node_t *sym_node, sel_node_t *select_node)
Parses a cursor declaration.
Definition: pars0pars.cc:926
pars_bound_id_t * pars_info_get_bound_id(pars_info_t *info, const char *name)
Get bound identifier with the given name.
Definition: pars0pars.cc:2035
que_t * pars_sql(pars_info_t *info, const char *str)
Parses an SQL string returning the query graph.
Definition: pars0pars.cc:1685
sym_node_t * pars_parameter_declaration(sym_node_t *node, ulint param_type, pars_res_word_t *type)
Parses a procedure parameter declaration.
Definition: pars0pars.cc:1272
ulint pars_star_denoter
Global variable used to denote the '*' in SELECT * FROM.
Definition: pars0pars.cc:92
pars_res_word_t pars_sum_token
Definition: pars0pars.cc:74
void pars_info_free(pars_info_t *info)
Free info struct and everything it contains.
Definition: pars0pars.cc:1776
tab_node_t * pars_create_table(sym_node_t *table_sym, sym_node_t *column_defs, sym_node_t *compact, sym_node_t *block_size, void *not_fit_in_memory)
Parses a table creation operation.
Definition: pars0pars.cc:1593
roll_node_t * pars_rollback_statement(void)
Parses a rollback statement.
Definition: pars0pars.cc:1563
pars_res_word_t pars_length_token
Definition: pars0pars.cc:72
void pars_info_bind_int4_literal(pars_info_t *info, const char *name, const uint32_t *val)
If the literal value already exists then it rebinds otherwise it creates a new entry.
Definition: pars0pars.cc:1895
void pars_info_bind_ull_literal(pars_info_t *info, const char *name, const uint64_t *val)
If the literal value already exists then it rebinds otherwise it creates a new entry.
Definition: pars0pars.cc:1956
upd_node_t * pars_update_statement_start(bool is_delete, sym_node_t *table_sym, col_assign_node_t *col_assign_list)
Parses a delete or update statement start.
Definition: pars0pars.cc:958
void pars_info_bind_varchar_literal(pars_info_t *info, const char *name, const byte *str, ulint str_len)
If the literal value already exists then it rebinds otherwise it creates a new entry.
Definition: pars0pars.cc:1856
pars_res_word_t pars_share_token
Definition: pars0pars.cc:87
pars_res_word_t pars_int_token
Definition: pars0pars.cc:78
ins_node_t * pars_insert_statement(sym_node_t *table_sym, que_node_t *values_list, sel_node_t *select)
Parses an insert statement.
Definition: pars0pars.cc:1157
void pars_info_bind_id(pars_info_t *info, bool copy_name, const char *name, const char *id)
Add bound id.
Definition: pars0pars.cc:2006
order_node_t * pars_order_by(sym_node_t *column, pars_res_word_t *asc)
Parses an ORDER BY clause.
Definition: pars0pars.cc:419
for_node_t * pars_for_statement(sym_node_t *loop_var, que_node_t *loop_start_limit, que_node_t *loop_end_limit, que_node_t *stat_list)
Parses a for-loop-statement.
Definition: pars0pars.cc:1400
void pars_close()
Clean up the internal parser.
Definition: pars0pars.cc:101
void pars_info_bind_int8_literal(pars_info_t *info, const char *name, const uint64_t *val)
If the literal value already exists then it rebinds otherwise it creates a new entry.
Definition: pars0pars.cc:1916
bool(* pars_user_func_cb_t)(void *arg, void *user_arg)
Type of the user functions.
Definition: pars0pars.h:50
sel_node_t * pars_select_statement(sel_node_t *select_node, sym_node_t *table_list, que_node_t *search_cond, pars_res_word_t *for_update, pars_res_word_t *consistent_read, order_node_t *order_by)
Parses a select statement.
Definition: pars0pars.cc:848
func_node_t * pars_func(que_node_t *res_word, que_node_t *arg)
Parses a function expression.
Definition: pars0pars.cc:251
sel_node_t * pars_select_list(que_node_t *select_list, sym_node_t *into_list)
Parses a select list; creates a query graph node for the whole SELECT statement.
Definition: pars0pars.cc:794
sym_node_t * pars_column_def(sym_node_t *sym_node, pars_res_word_t *type, sym_node_t *len, void *is_unsigned, void *is_not_null)
Parses a column definition at a table creation.
Definition: pars0pars.cc:1569
func_node_t * pars_op(int func, que_node_t *arg1, que_node_t *arg2)
Parses an operator expression.
Definition: pars0pars.cc:392
void pars_info_add_id(pars_info_t *info, const char *name, const char *id)
Add bound id.
pars_info_t * pars_info_create(void)
Create parser info struct.
Definition: pars0pars.cc:1758
pars_res_word_t pars_float_token
Definition: pars0pars.cc:81
pars_res_word_t pars_desc_token
Definition: pars0pars.cc:84
void pars_info_add_ull_literal(pars_info_t *info, const char *name, uint64_t val)
Equivalent to:
Definition: pars0pars.cc:1940
pars_bound_lit_t * pars_info_get_bound_lit(pars_info_t *info, const char *name)
Get bound literal with the given name.
Definition: pars0pars.cc:2041
pars_res_word_t pars_blob_token
Definition: pars0pars.cc:77
pars_res_word_t pars_unique_token
Definition: pars0pars.cc:88
commit_node_t * pars_commit_statement(void)
Parses a commit statement.
Definition: pars0pars.cc:1557
pars_res_word_t pars_distinct_token
Definition: pars0pars.cc:75
col_assign_node_t * pars_column_assignment(sym_node_t *column, que_node_t *exp)
Parses a column assignment in an update.
Definition: pars0pars.cc:978
open_node_t * pars_open_statement(ulint type, sym_node_t *cursor)
Parses an open or close cursor statement.
Definition: pars0pars.cc:1531
fetch_node_t * pars_fetch_statement(sym_node_t *cursor, sym_node_t *into_list, sym_node_t *user_func)
Parses a fetch statement.
Definition: pars0pars.cc:1482
int yyparse(void)
Definition: pars0grm.cc:1409
if_node_t * pars_if_statement(que_node_t *cond, que_node_t *stat_list, que_node_t *else_part)
Parses an if-statement.
Definition: pars0pars.cc:1329
sym_node_t * pars_variable_declaration(sym_node_t *node, pars_res_word_t *type)
Parses a variable declaration.
Definition: pars0pars.cc:1255
ind_node_t * pars_create_index(pars_res_word_t *unique_def, pars_res_word_t *clustered_def, sym_node_t *index_sym, sym_node_t *table_sym, sym_node_t *column_list)
Parses an index creation operation.
Definition: pars0pars.cc:1598
pars_res_word_t pars_bigint_token
Definition: pars0pars.cc:79
ib_mutex_t pars_mutex
Mutex to protect the sql parser.
Definition: pars0pars.cc:95
pars_res_word_t pars_substr_token
Definition: pars0pars.cc:69
sym_tab_t * pars_sym_tab_global
Definition: pars0pars.cc:63
pars_res_word_t pars_binary_token
Definition: pars0pars.cc:76
que_node_t * pars_function_declaration(sym_node_t *sym_node)
Parses a function declaration.
Definition: pars0pars.cc:943
pars_res_word_t pars_concat_token
Definition: pars0pars.cc:70
int yydebug
If the following is set true, the parser will emit debugging information.
void pars_info_add_str_literal(pars_info_t *info, const char *name, const char *str)
Equivalent to pars_info_add_literal(info, name, str, strlen(str), DATA_VARCHAR, DATA_ENGLISH).
Definition: pars0pars.cc:1818
elsif_node_t * pars_elsif_element(que_node_t *cond, que_node_t *stat_list)
Parses an elsif element.
Definition: pars0pars.cc:1307
int pars_like_rebind(sym_node_t *node, const byte *ptr, ulint len)
Definition: pars0pars.cc:261
exit_node_t * pars_exit_statement(void)
Parses an exit statement.
Definition: pars0pars.cc:1433
return_node_t * pars_return_statement(void)
Parses a return-statement.
Definition: pars0pars.cc:1445
pars_res_word_t pars_count_token
Definition: pars0pars.cc:73
void pars_info_add_literal(pars_info_t *info, const char *name, const void *address, ulint length, ulint type, ulint prtype)
Add bound literal.
Definition: pars0pars.cc:1788
upd_node_t * pars_update_statement(upd_node_t *node, sym_node_t *cursor_sym, que_node_t *search_cond)
Parses an update or delete statement.
Definition: pars0pars.cc:1076
void pars_info_add_int4_literal(pars_info_t *info, const char *name, lint val)
Equivalent to:
Definition: pars0pars.cc:1880
void pars_info_bind_literal(pars_info_t *info, const char *name, const void *address, ulint length, ulint type, ulint prtype)
Definition: pars0pars.cc:1829
pars_res_word_t pars_asc_token
Definition: pars0pars.cc:83
pars_res_word_t pars_to_binary_token
Definition: pars0pars.cc:68
int pars_get_lex_chars(char *buf, size_t max_size)
Retrieves characters to the lexical analyzer.
Definition: pars0pars.cc:1651
pars_res_word_t pars_close_token
Definition: pars0pars.cc:86
void pars_info_bind_function(pars_info_t *info, const char *name, pars_user_func_cb_t func, void *arg)
Add user function.
Definition: pars0pars.cc:1977
while_node_t * pars_while_statement(que_node_t *cond, que_node_t *stat_list)
Parses a while-statement.
Definition: pars0pars.cc:1376
pars_res_word_t pars_char_token
Definition: pars0pars.cc:80
void pars_init()
Initialize for the internal parser.
Definition: pars0pars.cc:98
pars_res_word_t pars_update_token
Definition: pars0pars.cc:82
pars_res_word_t pars_clustered_token
Definition: pars0pars.cc:89
void yyerror(const char *s)
Called by yyparse on error.
Definition: pars0pars.cc:1674
assign_node_t * pars_assignment_statement(sym_node_t *var, que_node_t *val)
Parses an assignment statement.
Definition: pars0pars.cc:1457
que_fork_t * pars_procedure_definition(sym_node_t *sym_node, sym_node_t *param_list, que_node_t *stat_list)
Parses a procedure definition.
Definition: pars0pars.cc:1605
que_thr_t * pars_complete_graph_for_exec(que_node_t *node, trx_t *trx, mem_heap_t *heap, row_prebuilt_t *prebuilt)
Completes a query graph by adding query thread and fork nodes above it and prepares the graph for run...
Definition: pars0pars.cc:1734
void pars_lexer_close(void)
Release any resources used by the lexer.
pars_res_word_t pars_open_token
Definition: pars0pars.cc:85
Query graph global types.
void que_node_t
Definition: que0types.h:41
required string type
Definition: replication_group_member_actions.proto:34
Interface between Innobase row operations and MySQL.
Row operation global types.
static void copy_name(char(&to)[N], std::string_view from)
Definition: set_var.cc:604
case opt name
Definition: sslopt-case.h:29
Assignment statement node.
Definition: pars0pars.h:583
sym_node_t * var
variable to set
Definition: pars0pars.h:585
que_node_t * val
value to assign
Definition: pars0pars.h:586
que_common_t common
type: QUE_NODE_ASSIGNMENT
Definition: pars0pars.h:584
Column assignment node.
Definition: pars0pars.h:590
que_common_t common
type: QUE_NODE_COL_ASSIGN
Definition: pars0pars.h:591
que_node_t * val
value to assign
Definition: pars0pars.h:593
sym_node_t * col
column to set
Definition: pars0pars.h:592
Commit command node in a query graph.
Definition: trx0trx.h:1337
elsif-element node
Definition: pars0pars.h:533
que_node_t * stat_list
statement list
Definition: pars0pars.h:536
que_common_t common
type: QUE_NODE_ELSIF
Definition: pars0pars.h:534
que_node_t * cond
if condition
Definition: pars0pars.h:535
exit statement node
Definition: pars0pars.h:573
que_common_t common
type: QUE_NODE_EXIT
Definition: pars0pars.h:574
Fetch statement node.
Definition: row0sel.h:376
for-loop-statement node
Definition: pars0pars.h:556
sym_node_t * loop_var
loop variable: this is the dereferenced symbol from the variable declarations, not the symbol occurre...
Definition: pars0pars.h:558
que_node_t * loop_end_limit
end value of loop variable
Definition: pars0pars.h:564
que_node_t * stat_list
statement list
Definition: pars0pars.h:569
que_common_t common
type: QUE_NODE_FOR
Definition: pars0pars.h:557
que_node_t * loop_start_limit
initial value of loop variable
Definition: pars0pars.h:563
lint loop_end_value
evaluated value for the end value: it is calculated only when the loop is entered,...
Definition: pars0pars.h:565
A predefined function or operator node in a parsing tree; this construct is also used for some non-fu...
Definition: pars0pars.h:497
UT_LIST_NODE_T(func_node_t) func_node_list
list of function nodes in a parsed query graph
que_common_t common
type: QUE_NODE_FUNC
Definition: pars0pars.h:498
UT_LIST_NODE_T(func_node_t) cond_list
list of comparison conditions; defined only for comparison operator nodes except, presently,...
que_node_t * args
argument(s) of the function
Definition: pars0pars.h:501
ulint fclass
class of the function
Definition: pars0pars.h:500
int func
token code of the function name
Definition: pars0pars.h:499
if-statement node
Definition: pars0pars.h:540
elsif_node_t * elsif_list
elsif element list
Definition: pars0pars.h:545
que_common_t common
type: QUE_NODE_IF
Definition: pars0pars.h:541
que_node_t * stat_list
statement list
Definition: pars0pars.h:543
que_node_t * cond
if condition
Definition: pars0pars.h:542
que_node_t * else_part
else-part statement list
Definition: pars0pars.h:544
Definition: dict0crea.h:148
Definition: row0ins.h:162
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:302
Open or close cursor statement node.
Definition: row0sel.h:400
An order-by node in a select.
Definition: pars0pars.h:516
que_common_t common
type: QUE_NODE_ORDER
Definition: pars0pars.h:517
bool asc
true if ascending, false if descending
Definition: pars0pars.h:519
sym_node_t * column
order-by column
Definition: pars0pars.h:518
Bound identifier.
Definition: pars0pars.h:484
const char * id
identifier
Definition: pars0pars.h:486
const char * name
name
Definition: pars0pars.h:485
Bound literal.
Definition: pars0pars.h:474
const void * address
address
Definition: pars0pars.h:476
const char * name
name
Definition: pars0pars.h:475
ulint type
type, e.g.
Definition: pars0pars.h:478
sym_node_t * node
symbol node
Definition: pars0pars.h:480
ulint length
length of data
Definition: pars0pars.h:477
ulint prtype
precise type, e.g.
Definition: pars0pars.h:479
Extra information supplied for pars_sql().
Definition: pars0pars.h:452
ib_vector_t * funcs
user functions, or NUll (pars_user_func_t*)
Definition: pars0pars.h:455
ib_vector_t * bound_ids
bound ids, or NULL (pars_bound_id_t*)
Definition: pars0pars.h:459
bool graph_owns_us
if true (which is the default), que_graph_free() will free us
Definition: pars0pars.h:462
mem_heap_t * heap
our own memory heap
Definition: pars0pars.h:453
ib_vector_t * bound_lits
bound literals, or NULL (pars_bound_lit_t*)
Definition: pars0pars.h:457
Struct used to denote a reserved word in a parsing tree.
Definition: pars0pars.h:490
int code
the token code for the reserved word from pars0grm.h
Definition: pars0pars.h:491
User-supplied function and argument.
Definition: pars0pars.h:467
pars_user_func_cb_t func
function address
Definition: pars0pars.h:469
const char * name
function name
Definition: pars0pars.h:468
void * arg
user-supplied argument
Definition: pars0pars.h:470
Procedure definition node.
Definition: pars0pars.h:523
que_common_t common
type: QUE_NODE_PROC
Definition: pars0pars.h:524
sym_tab_t * sym_tab
symbol table of this procedure
Definition: pars0pars.h:529
que_node_t * stat_list
statement list
Definition: pars0pars.h:528
sym_node_t * proc_id
procedure name symbol in the symbol table of this same procedure
Definition: pars0pars.h:525
sym_node_t * param_list
input and output parameters
Definition: pars0pars.h:527
Definition: que0types.h:51
Definition: que0que.h:301
Definition: que0que.h:242
return-statement node
Definition: pars0pars.h:578
que_common_t common
type: QUE_NODE_RETURN
Definition: pars0pars.h:579
Rollback command node in a query graph.
Definition: trx0roll.h:156
A struct for (sometimes lazily) prebuilt structures in an Innobase table handle used within MySQL; th...
Definition: row0mysql.h:515
Select statement node.
Definition: row0sel.h:329
Symbol table node.
Definition: pars0sym.h:113
Symbol table.
Definition: pars0sym.h:203
Definition: dict0crea.h:112
Definition: trx0trx.h:675
Definition: row0upd.h:701
while-statement node
Definition: pars0pars.h:549
que_common_t common
type: QUE_NODE_WHILE
Definition: pars0pars.h:550
que_node_t * stat_list
statement list
Definition: pars0pars.h:552
que_node_t * cond
while condition
Definition: pars0pars.h:551
Transaction system global type definitions.
Version control for database, common definitions, and include files.
unsigned long int ulint
Definition: univ.i:406
long int lint
Definition: univ.i:407
Users and sessions global types.
#define UT_LIST_NODE_GETTER_DEFINITION(t, m)
A helper for the UT_LIST_BASE_NODE_T_EXTERN which declares a node getter struct which extracts member...
Definition: ut0lst.h:270
A vector of pointers to data items.