diff options
Diffstat (limited to 'storage/innobase/include/pars0pars.h')
-rw-r--r-- | storage/innobase/include/pars0pars.h | 61 |
1 files changed, 32 insertions, 29 deletions
diff --git a/storage/innobase/include/pars0pars.h b/storage/innobase/include/pars0pars.h index 9eb8aeb747f..65ff7533828 100644 --- a/storage/innobase/include/pars0pars.h +++ b/storage/innobase/include/pars0pars.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -469,9 +469,10 @@ que_thr_t* pars_complete_graph_for_exec( /*=========================*/ que_node_t* node, /*!< in: root node for an incomplete - query graph */ + query graph, or NULL for dummy graph */ trx_t* trx, /*!< in: transaction handle */ - mem_heap_t* heap); /*!< in: memory heap from which allocated */ + mem_heap_t* heap) /*!< in: memory heap from which allocated */ + __attribute__((nonnull(2,3), warn_unused_result)); /****************************************************************//** Create parser info struct. @@ -618,6 +619,18 @@ pars_info_add_ull_literal( ib_uint64_t val); /*!< in: value */ /****************************************************************//** +If the literal value already exists then it rebinds otherwise it +creates a new entry. */ +UNIV_INTERN +void +pars_info_bind_ull_literal( +/*=======================*/ + pars_info_t* info, /*!< in: info struct */ + const char* name, /*!< in: name */ + const ib_uint64_t* val) /*!< in: value */ + __attribute__((nonnull)); + +/****************************************************************//** Add bound id. */ UNIV_INTERN void @@ -628,16 +641,6 @@ pars_info_add_id( const char* id); /*!< in: id */ /****************************************************************//** -Get user function with the given name. -@return user func, or NULL if not found */ -UNIV_INTERN -pars_user_func_t* -pars_info_get_user_func( -/*====================*/ - pars_info_t* info, /*!< in: info struct */ - const char* name); /*!< in: function name to find*/ - -/****************************************************************//** Get bound literal with the given name. @return bound literal, or NULL if not found */ UNIV_INTERN @@ -665,7 +668,7 @@ pars_lexer_close(void); /*==================*/ /** Extra information supplied for pars_sql(). */ -struct pars_info_struct { +struct pars_info_t { mem_heap_t* heap; /*!< our own memory heap */ ib_vector_t* funcs; /*!< user functions, or NUll @@ -680,14 +683,14 @@ struct pars_info_struct { }; /** User-supplied function and argument. */ -struct pars_user_func_struct { +struct pars_user_func_t { const char* name; /*!< function name */ pars_user_func_cb_t func; /*!< function address */ void* arg; /*!< user-supplied argument */ }; /** Bound literal. */ -struct pars_bound_lit_struct { +struct pars_bound_lit_t { const char* name; /*!< name */ const void* address; /*!< address */ ulint length; /*!< length of data */ @@ -697,20 +700,20 @@ struct pars_bound_lit_struct { }; /** Bound identifier. */ -struct pars_bound_id_struct { +struct pars_bound_id_t { const char* name; /*!< name */ const char* id; /*!< identifier */ }; /** Struct used to denote a reserved word in a parsing tree */ -struct pars_res_word_struct{ +struct pars_res_word_t{ int code; /*!< the token code for the reserved word from pars0grm.h */ }; /** A predefined function or operator node in a parsing tree; this construct is also used for some non-functions like the assignment ':=' */ -struct func_node_struct{ +struct func_node_t{ que_common_t common; /*!< type: QUE_NODE_FUNC */ int func; /*!< token code of the function name */ ulint fclass; /*!< class of the function */ @@ -725,14 +728,14 @@ struct func_node_struct{ }; /** An order-by node in a select */ -struct order_node_struct{ +struct order_node_t{ que_common_t common; /*!< type: QUE_NODE_ORDER */ sym_node_t* column; /*!< order-by column */ ibool asc; /*!< TRUE if ascending, FALSE if descending */ }; /** Procedure definition node */ -struct proc_node_struct{ +struct proc_node_t{ que_common_t common; /*!< type: QUE_NODE_PROC */ sym_node_t* proc_id; /*!< procedure name symbol in the symbol table of this same procedure */ @@ -742,14 +745,14 @@ struct proc_node_struct{ }; /** elsif-element node */ -struct elsif_node_struct{ +struct elsif_node_t{ que_common_t common; /*!< type: QUE_NODE_ELSIF */ que_node_t* cond; /*!< if condition */ que_node_t* stat_list; /*!< statement list */ }; /** if-statement node */ -struct if_node_struct{ +struct if_node_t{ que_common_t common; /*!< type: QUE_NODE_IF */ que_node_t* cond; /*!< if condition */ que_node_t* stat_list; /*!< statement list */ @@ -758,14 +761,14 @@ struct if_node_struct{ }; /** while-statement node */ -struct while_node_struct{ +struct while_node_t{ que_common_t common; /*!< type: QUE_NODE_WHILE */ que_node_t* cond; /*!< while condition */ que_node_t* stat_list; /*!< statement list */ }; /** for-loop-statement node */ -struct for_node_struct{ +struct for_node_t{ que_common_t common; /*!< type: QUE_NODE_FOR */ sym_node_t* loop_var; /*!< loop variable: this is the dereferenced symbol from the @@ -782,24 +785,24 @@ struct for_node_struct{ }; /** exit statement node */ -struct exit_node_struct{ +struct exit_node_t{ que_common_t common; /*!< type: QUE_NODE_EXIT */ }; /** return-statement node */ -struct return_node_struct{ +struct return_node_t{ que_common_t common; /*!< type: QUE_NODE_RETURN */ }; /** Assignment statement node */ -struct assign_node_struct{ +struct assign_node_t{ que_common_t common; /*!< type: QUE_NODE_ASSIGNMENT */ sym_node_t* var; /*!< variable to set */ que_node_t* val; /*!< value to assign */ }; /** Column assignment node */ -struct col_assign_node_struct{ +struct col_assign_node_t{ que_common_t common; /*!< type: QUE_NODE_COL_ASSIGN */ sym_node_t* col; /*!< column to set */ que_node_t* val; /*!< value to assign */ |