MySQL 9.1.0
Source Code Documentation
|
SQL parser. More...
#include "current_thd.h"
#include "ha_prototypes.h"
#include "data0data.h"
#include "data0type.h"
#include "dict0crea.h"
#include "dict0dd.h"
#include "dict0dict.h"
#include "dict0mem.h"
#include "eval0eval.h"
#include "lock0lock.h"
#include "pars0grm.h"
#include "pars0opt.h"
#include "pars0pars.h"
#include "que0que.h"
#include "row0ins.h"
#include "row0sel.h"
#include "row0upd.h"
#include "trx0roll.h"
#include "trx0trx.h"
#include "my_dbug.h"
Functions | |
void | pars_init () |
Initialize for the internal parser. More... | |
void | pars_close () |
Clean up the internal parser. More... | |
static pars_user_func_t * | pars_info_lookup_user_func (pars_info_t *info, const char *name) |
static pars_bound_id_t * | pars_info_lookup_bound_id (pars_info_t *info, const char *name) |
static pars_bound_lit_t * | pars_info_lookup_bound_lit (pars_info_t *info, const char *name) |
static ulint | pars_func_get_class (int func) |
Determines the class of a function code. More... | |
static func_node_t * | pars_func_low (int func, que_node_t *arg) |
Parses an operator or predefined function expression. More... | |
func_node_t * | pars_func (que_node_t *res_word, que_node_t *arg) |
Parses a function expression. More... | |
int | pars_like_rebind (sym_node_t *node, const byte *ptr, ulint ptr_len) |
static int | pars_like_op (que_node_t *arg) |
func_node_t * | pars_op (int func, que_node_t *arg1, que_node_t *arg2) |
Parses an operator expression. More... | |
order_node_t * | pars_order_by (sym_node_t *column, pars_res_word_t *asc) |
Parses an ORDER BY clause. More... | |
static bool | pars_is_string_type (ulint mtype) |
Determine if a data type is a built-in string data type of the InnoDB SQL parser. More... | |
static void | pars_resolve_func_data_type (func_node_t *node) |
Resolves the data type of a function in an expression. More... | |
static void | pars_resolve_exp_variables_and_types (sel_node_t *select_node, que_node_t *exp_node) |
Resolves the meaning of variables in an expression and the data types of functions. More... | |
static void | pars_resolve_exp_list_variables_and_types (sel_node_t *select_node, que_node_t *exp_node) |
Resolves the meaning of variables in an expression list. More... | |
static void | pars_resolve_exp_columns (sym_node_t *table_node, que_node_t *exp_node) |
Resolves the columns in an expression. More... | |
static void | pars_resolve_exp_list_columns (sym_node_t *table_node, que_node_t *exp_node) |
Resolves the meaning of columns in an expression list. More... | |
static void | pars_retrieve_table_def (sym_node_t *sym_node) |
Retrieves the table definition for a table name id. More... | |
static ulint | pars_retrieve_table_list_defs (sym_node_t *sym_node) |
Retrieves the table definitions for a list of table name ids. More... | |
static void | pars_select_all_columns (sel_node_t *select_node) |
Adds all columns to the select list if the query is SELECT * FROM ... More... | |
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. More... | |
static void | pars_check_aggregate (sel_node_t *select_node) |
Checks if the query is an aggregate query, in which case the selct list must contain only aggregate function items. More... | |
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 *lock_shared, order_node_t *order_by) |
Parses a select statement. More... | |
que_node_t * | pars_cursor_declaration (sym_node_t *sym_node, sel_node_t *select_node) |
Parses a cursor declaration. More... | |
que_node_t * | pars_function_declaration (sym_node_t *sym_node) |
Parses a function declaration. More... | |
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. More... | |
col_assign_node_t * | pars_column_assignment (sym_node_t *column, que_node_t *exp) |
Parses a column assignment in an update. More... | |
static void | pars_process_assign_list (upd_node_t *node) |
Processes an update node assignment list. More... | |
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. More... | |
ins_node_t * | pars_insert_statement (sym_node_t *table_sym, que_node_t *values_list, sel_node_t *select) |
Parses an insert statement. More... | |
static void | pars_set_dfield_type (dfield_t *dfield, pars_res_word_t *type, ulint len, bool is_unsigned, bool is_not_null) |
Set the type of a dfield. More... | |
sym_node_t * | pars_variable_declaration (sym_node_t *node, pars_res_word_t *type) |
Parses a variable declaration. More... | |
sym_node_t * | pars_parameter_declaration (sym_node_t *node, ulint param_type, pars_res_word_t *type) |
Parses a procedure parameter declaration. More... | |
static void | pars_set_parent_in_list (que_node_t *node_list, que_node_t *parent) |
Sets the parent field in a query node list. More... | |
elsif_node_t * | pars_elsif_element (que_node_t *cond, que_node_t *stat_list) |
Parses an elsif element. More... | |
if_node_t * | pars_if_statement (que_node_t *cond, que_node_t *stat_list, que_node_t *else_part) |
Parses an if-statement. More... | |
while_node_t * | pars_while_statement (que_node_t *cond, que_node_t *stat_list) |
Parses a while-statement. More... | |
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. More... | |
exit_node_t * | pars_exit_statement (void) |
Parses an exit statement. More... | |
return_node_t * | pars_return_statement (void) |
Parses a return-statement. More... | |
assign_node_t * | pars_assignment_statement (sym_node_t *var, que_node_t *val) |
Parses an assignment statement. More... | |
fetch_node_t * | pars_fetch_statement (sym_node_t *cursor, sym_node_t *into_list, sym_node_t *user_func) |
Parses a fetch statement. More... | |
open_node_t * | pars_open_statement (ulint type, sym_node_t *cursor) |
Parses an open or close cursor statement. More... | |
commit_node_t * | pars_commit_statement (void) |
Parses a commit statement. More... | |
roll_node_t * | pars_rollback_statement (void) |
Parses a rollback statement. More... | |
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. More... | |
tab_node_t * | pars_create_table (sym_node_t *, sym_node_t *, sym_node_t *, sym_node_t *, void *) |
Parses a table creation operation. More... | |
ind_node_t * | pars_create_index (pars_res_word_t *, pars_res_word_t *, sym_node_t *, sym_node_t *, sym_node_t *) |
Parses an index creation operation. More... | |
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. More... | |
int | pars_get_lex_chars (char *buf, size_t max_size) |
Retrieves characters to the lexical analyzer. More... | |
void | yyerror (const char *s) |
Called by yyparse on error. More... | |
que_t * | pars_sql (pars_info_t *info, const char *str) |
Parses an SQL string returning the query graph. More... | |
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 running. More... | |
pars_info_t * | pars_info_create (void) |
Create parser info struct. More... | |
void | pars_info_free (pars_info_t *info) |
Free info struct and everything it contains. More... | |
void | pars_info_add_literal (pars_info_t *info, const char *name, const void *address, ulint length, ulint type, ulint prtype) |
Add bound literal. More... | |
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). More... | |
void | pars_info_bind_literal (pars_info_t *info, const char *name, const void *address, ulint length, ulint type, ulint prtype) |
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. More... | |
void | pars_info_add_int4_literal (pars_info_t *info, const char *name, lint val) |
Equivalent to: More... | |
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. More... | |
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. More... | |
void | pars_info_add_ull_literal (pars_info_t *info, const char *name, uint64_t val) |
Equivalent to: More... | |
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. More... | |
void | pars_info_bind_function (pars_info_t *info, const char *name, pars_user_func_cb_t func, void *arg) |
Add user function. More... | |
void | pars_info_bind_id (pars_info_t *info, bool copy_name, const char *name, const char *id) |
Add bound id. More... | |
pars_bound_id_t * | pars_info_get_bound_id (pars_info_t *info, const char *name) |
Get bound identifier with the given name. More... | |
pars_bound_lit_t * | pars_info_get_bound_lit (pars_info_t *info, const char *name) |
Get bound literal with the given name. More... | |
SQL parser.
Created 11/19/1996 Heikki Tuuri
assign_node_t * pars_assignment_statement | ( | sym_node_t * | var, |
que_node_t * | val | ||
) |
Parses an assignment statement.
var | in: variable to assign |
val | in: value to assign |
|
static |
Checks if the query is an aggregate query, in which case the selct list must contain only aggregate function items.
select_node | in: select node already containing the select list |
void pars_close | ( | ) |
Clean up the internal parser.
col_assign_node_t * pars_column_assignment | ( | sym_node_t * | column, |
que_node_t * | exp | ||
) |
Parses a column assignment in an update.
column | in: column to assign |
exp | in: value to assign |
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.
sym_node | in: column node in the symbol table |
type | in: data type |
len | in: length of column, or NULL |
is_unsigned | in: if not NULL, column is of type UNSIGNED. |
is_not_null | in: if not NULL, column is of type NOT NULL. |
commit_node_t * pars_commit_statement | ( | void | ) |
Parses a commit statement.
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 running.
The fork created is of type QUE_FORK_MYSQL_INTERFACE.
[in] | node | root node for an incomplete query graph, or NULL for dummy graph |
[in] | trx | transaction handle |
[in] | heap | memory heap from which allocated |
[in] | prebuilt | row prebuilt structure |
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.
[in] | unique_def | Not NULL if a unique index. |
[in] | clustered_def | Not NULL if a clustered index. |
[in] | index_sym | Index name node in the symbol table. |
[in] | table_sym | Table name node in the symbol table. |
[in] | column_list | List of column names. |
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.
[in] | table_sym | table name node in the symbol table |
[in] | column_defs | list of column names |
[in] | not_fit_in_memory | a non-NULL pointer means that this is a table which in simulations should be simulated as not fitting in memory; thread is put to sleep to simulate disk accesses; NOTE that this flag is not stored to the data dictionary on disk, and the database will forget about non-NULL value if it has to reload the table definition from disk |
[in] | compact | non-NULL if COMPACT table |
[in] | block_size | block size (can be NULL) |
que_node_t * pars_cursor_declaration | ( | sym_node_t * | sym_node, |
sel_node_t * | select_node | ||
) |
Parses a cursor declaration.
sym_node | in: cursor id node in the symbol table |
select_node | in: select node |
elsif_node_t * pars_elsif_element | ( | que_node_t * | cond, |
que_node_t * | stat_list | ||
) |
Parses an elsif element.
cond | in: if-condition |
stat_list | in: statement list |
exit_node_t * pars_exit_statement | ( | void | ) |
Parses an exit statement.
fetch_node_t * pars_fetch_statement | ( | sym_node_t * | cursor, |
sym_node_t * | into_list, | ||
sym_node_t * | user_func | ||
) |
Parses a fetch statement.
into_list or user_func (but not both) must be non-NULL.
cursor | in: cursor node |
into_list | in: variables to set, or NULL |
user_func | in: user function name, or NULL |
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.
loop_var | in: loop variable |
loop_start_limit | in: loop start expression |
loop_end_limit | in: loop end expression |
stat_list | in: statement list |
func_node_t * pars_func | ( | que_node_t * | res_word, |
que_node_t * | arg | ||
) |
Parses a function expression.
res_word | in: function name reserved word |
arg | in: first argument in the argument list |
|
static |
Determines the class of a function code.
func | in: function code: '=', PARS_GE_TOKEN, ... |
|
static |
Parses an operator or predefined function expression.
func | in: function token code |
arg | in: first argument in the argument list |
que_node_t * pars_function_declaration | ( | sym_node_t * | sym_node | ) |
Parses a function declaration.
sym_node | in: function id node in the symbol table |
int pars_get_lex_chars | ( | char * | buf, |
size_t | max_size | ||
) |
Retrieves characters to the lexical analyzer.
[in,out] | buf | Buffer where to copy |
[in] | max_size | Maximum number of characters which fit in the buffer |
if_node_t * pars_if_statement | ( | que_node_t * | cond, |
que_node_t * | stat_list, | ||
que_node_t * | else_part | ||
) |
Parses an if-statement.
cond | in: if-condition |
stat_list | in: statement list |
else_part | in: else-part statement list or elsif element list |
void pars_info_add_int4_literal | ( | pars_info_t * | info, |
const char * | name, | ||
lint | val | ||
) |
Equivalent to:
char buf[4]; mach_write_to_4(buf, val); pars_info_add_literal(info, name, buf, 4, DATA_INT, 0);
except that the buffer is dynamically allocated from the info struct's heap.
info | in: info struct |
name | in: name |
val | in: value |
void pars_info_add_literal | ( | pars_info_t * | info, |
const char * | name, | ||
const void * | address, | ||
ulint | length, | ||
ulint | type, | ||
ulint | prtype | ||
) |
Add bound literal.
[in] | info | Info struct |
[in] | name | Name |
[in] | address | Address |
[in] | length | Length of data |
[in] | type | Type, e.g. data_fixbinary |
[in] | prtype | Precise type, e.g. data_unsigned |
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).
[in] | info | Info struct |
[in] | name | Name |
[in] | str | String |
info | in: info struct |
name | in: name |
str | in: string |
void pars_info_add_ull_literal | ( | pars_info_t * | info, |
const char * | name, | ||
uint64_t | val | ||
) |
Equivalent to:
char buf[8]; mach_write_to_8(buf, val); pars_info_add_literal(info, name, buf, 8, DATA_FIXBINARY, 0);
except that the buffer is dynamically allocated from the info struct's heap.
info | in: info struct |
name | in: name |
val | in: value |
void pars_info_bind_function | ( | pars_info_t * | info, |
const char * | name, | ||
pars_user_func_cb_t | func, | ||
void * | arg | ||
) |
Add user function.
[in] | info | Info struct |
[in] | name | Function name |
[in] | func | Function address |
[in] | arg | User-supplied argument |
void pars_info_bind_id | ( | pars_info_t * | info, |
bool | copy_name, | ||
const char * | name, | ||
const char * | id | ||
) |
Add bound id.
[in] | info | info struct |
[in] | copy_name | copy name if true |
[in] | name | name |
[in] | id | id |
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.
[in] | info | Info struct |
[in] | name | Name |
[in] | val | Value |
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.
[in] | info | Info struct |
[in] | name | Name |
[in] | val | Value |
void pars_info_bind_literal | ( | pars_info_t * | info, |
const char * | name, | ||
const void * | address, | ||
ulint | length, | ||
ulint | type, | ||
ulint | prtype | ||
) |
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.
[in] | info | Info struct |
[in] | name | Name |
[in] | val | Value |
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.
[in] | info | Info struct |
[in] | name | Name |
[in] | str | String |
[in] | str_len | String length |
pars_info_t * pars_info_create | ( | void | ) |
Create parser info struct.
void pars_info_free | ( | pars_info_t * | info | ) |
Free info struct and everything it contains.
in, own: info struct
info | in, own: info struct |
pars_bound_id_t * pars_info_get_bound_id | ( | pars_info_t * | info, |
const char * | name | ||
) |
Get bound identifier with the given name.
[in] | info | info struct |
[in] | name | bound id name to find |
pars_bound_lit_t * pars_info_get_bound_lit | ( | pars_info_t * | info, |
const char * | name | ||
) |
Get bound literal with the given name.
info | in: info struct |
name | in: bound literal name to find |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
void pars_init | ( | ) |
Initialize for the internal parser.
ins_node_t * pars_insert_statement | ( | sym_node_t * | table_sym, |
que_node_t * | values_list, | ||
sel_node_t * | select | ||
) |
Parses an insert statement.
table_sym | in: table name node |
values_list | in: value expression list or NULL |
select | in: select condition or NULL |
|
static |
Determine if a data type is a built-in string data type of the InnoDB SQL parser.
mtype | in: main data type |
|
static |
int pars_like_rebind | ( | sym_node_t * | node, |
const byte * | ptr, | ||
ulint | ptr_len | ||
) |
func_node_t * pars_op | ( | int | func, |
que_node_t * | arg1, | ||
que_node_t * | arg2 | ||
) |
Parses an operator expression.
func | in: operator token code |
arg1 | in: first argument |
arg2 | in: second argument or NULL for an unary operator |
open_node_t * pars_open_statement | ( | ulint | type, |
sym_node_t * | cursor | ||
) |
Parses an open or close cursor statement.
type | in: ROW_SEL_OPEN_CURSOR or ROW_SEL_CLOSE_CURSOR |
cursor | in: cursor node |
order_node_t * pars_order_by | ( | sym_node_t * | column, |
pars_res_word_t * | asc | ||
) |
Parses an ORDER BY clause.
Order by a single column only is supported.
column | in: column name |
asc | in: &pars_asc_token or pars_desc_token |
sym_node_t * pars_parameter_declaration | ( | sym_node_t * | node, |
ulint | param_type, | ||
pars_res_word_t * | type | ||
) |
Parses a procedure parameter declaration.
node | in: symbol table node allocated for the id of the parameter |
param_type | in: PARS_INPUT or PARS_OUTPUT |
type | in: pointer to a type token |
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.
sym_node | in: procedure id node in the symbol table |
param_list | in: parameter declaration list |
stat_list | in: statement list |
|
static |
Processes an update node assignment list.
node | in: update node |
|
static |
Resolves the columns in an expression.
table_node | in: first node in a table list |
exp_node | in: expression |
|
static |
Resolves the meaning of columns in an expression list.
table_node | in: first node in a table list |
exp_node | in: expression list first node, or NULL |
|
static |
Resolves the meaning of variables in an expression list.
It is an error if some identifier cannot be resolved here. Resolves also the data types of functions.
select_node | in: select node or NULL |
exp_node | in: expression list first node, or NULL |
|
static |
Resolves the meaning of variables in an expression and the data types of functions.
It is an error if some identifier cannot be resolved here.
select_node | in: select node or NULL; if this is not NULL then the variable sym nodes are added to the copy_variables list of select_node |
exp_node | in: expression |
|
static |
Resolves the data type of a function in an expression.
The argument data types must already be resolved.
node | in: function node |
|
static |
Retrieves the table definition for a table name id.
sym_node | in: table node |
|
static |
Retrieves the table definitions for a list of table name ids.
sym_node | in: first table node in list |
return_node_t * pars_return_statement | ( | void | ) |
Parses a return-statement.
roll_node_t * pars_rollback_statement | ( | void | ) |
Parses a rollback statement.
|
static |
Adds all columns to the select list if the query is SELECT * FROM ...
select_node | in: select node already containing the table list |
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.
select_list | in: select list |
into_list | in: variables list or NULL |
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 * | lock_shared, | ||
order_node_t * | order_by | ||
) |
Parses a select statement.
select_node | in: select node already containing the select list |
table_list | in: table list |
search_cond | in: search condition or NULL |
for_update | in: NULL or &pars_update_token |
lock_shared | in: NULL or &pars_share_token |
order_by | in: NULL or an order-by node |
|
static |
Set the type of a dfield.
dfield | in: dfield |
type | in: pointer to a type token |
len | in: length, or 0 |
is_unsigned | in: if true, column is UNSIGNED. |
is_not_null | in: if true, column is NOT NULL. |
|
static |
Sets the parent field in a query node list.
node_list | in: first node in a list |
parent | in: parent value to set in all nodes of the list |
que_t * pars_sql | ( | pars_info_t * | info, |
const char * | str | ||
) |
Parses an SQL string returning the query graph.
info | in: extra information, or NULL |
str | in: SQL string |
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.
node | in: update node |
cursor_sym | in: pointer to a cursor entry in the symbol table or NULL |
search_cond | in: search condition or NULL |
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.
is_delete | in: true if delete |
table_sym | in: table name node |
col_assign_list | in: column assignment list, NULL if delete |
sym_node_t * pars_variable_declaration | ( | sym_node_t * | node, |
pars_res_word_t * | type | ||
) |
Parses a variable declaration.
node | in: symbol table node allocated for the id of the variable |
type | in: pointer to a type token |
while_node_t * pars_while_statement | ( | que_node_t * | cond, |
que_node_t * | stat_list | ||
) |
Parses a while-statement.
cond | in: while-condition |
stat_list | in: statement list |
void yyerror | ( | const char * | s | ) |
Called by yyparse on error.
in: error message string
s | in: error message string |
pars_res_word_t pars_asc_token = {PARS_ASC_TOKEN} |
pars_res_word_t pars_bigint_token = {PARS_BIGINT_TOKEN} |
pars_res_word_t pars_binary_token = {PARS_BINARY_TOKEN} |
pars_res_word_t pars_blob_token = {PARS_BLOB_TOKEN} |
pars_res_word_t pars_char_token = {PARS_CHAR_TOKEN} |
pars_res_word_t pars_close_token = {PARS_CLOSE_TOKEN} |
pars_res_word_t pars_clustered_token = {PARS_CLUSTERED_TOKEN} |
pars_res_word_t pars_concat_token = {PARS_CONCAT_TOKEN} |
pars_res_word_t pars_count_token = {PARS_COUNT_TOKEN} |
pars_res_word_t pars_desc_token = {PARS_DESC_TOKEN} |
pars_res_word_t pars_distinct_token = {PARS_DISTINCT_TOKEN} |
pars_res_word_t pars_float_token = {PARS_FLOAT_TOKEN} |
pars_res_word_t pars_instr_token = {PARS_INSTR_TOKEN} |
pars_res_word_t pars_int_token = {PARS_INT_TOKEN} |
pars_res_word_t pars_length_token = {PARS_LENGTH_TOKEN} |
ib_mutex_t pars_mutex |
Mutex to protect the sql parser.
pars_res_word_t pars_open_token = {PARS_OPEN_TOKEN} |
pars_res_word_t pars_share_token = {PARS_SHARE_TOKEN} |
ulint pars_star_denoter = 12345678 |
Global variable used to denote the '*' in SELECT * FROM.
pars_res_word_t pars_substr_token = {PARS_SUBSTR_TOKEN} |
pars_res_word_t pars_sum_token = {PARS_SUM_TOKEN} |
sym_tab_t* pars_sym_tab_global |
pars_res_word_t pars_to_binary_token = {PARS_TO_BINARY_TOKEN} |
pars_res_word_t pars_unique_token = {PARS_UNIQUE_TOKEN} |
pars_res_word_t pars_update_token = {PARS_UPDATE_TOKEN} |