diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-12-06 09:05:52 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-04-05 15:02:54 +0400 |
commit | 46d076d67ab82b6b967d86b867a42b337daff5de (patch) | |
tree | 08bf12ff3a5374e37f7df71137e75b148372de96 /sql/sp_rcontext.h | |
parent | cd1afe0aac28cec267e9c2e74d7a5f73050e2614 (diff) | |
download | mariadb-git-46d076d67ab82b6b967d86b867a42b337daff5de.tar.gz |
MDEV-10577 sql_mode=ORACLE: %TYPE in variable declarations
Diffstat (limited to 'sql/sp_rcontext.h')
-rw-r--r-- | sql/sp_rcontext.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h index d040186ec34..061f736f6e9 100644 --- a/sql/sp_rcontext.h +++ b/sql/sp_rcontext.h @@ -70,7 +70,8 @@ public: /// @return valid sp_rcontext object or NULL in case of OOM-error. static sp_rcontext *create(THD *thd, const sp_pcontext *root_parsing_ctx, - Field *return_value_fld); + Field *return_value_fld, + bool resolve_type_refs); ~sp_rcontext(); @@ -185,8 +186,7 @@ public: // SP-variables. ///////////////////////////////////////////////////////////////////////// - int set_variable(THD *thd, uint var_idx, Item **value) - { return set_variable(thd, m_var_table->field[var_idx], value); } + int set_variable(THD *thd, uint var_idx, Item **value); Item *get_item(uint var_idx) const { return m_var_items[var_idx]; } @@ -334,7 +334,11 @@ private: /// @return error flag. /// @retval false on success. /// @retval true on error. - bool init_var_table(THD *thd); + bool init_var_table(THD *thd, List<Spvar_definition> &defs); + + bool resolve_type_refs(THD *, List<Spvar_definition> &defs); + bool resolve_type_ref(THD *thd, Column_definition *def, + Qualified_column_ident *ref); /// Create and initialize an Item-adapter (Item_field) for each SP-var field. /// @@ -343,7 +347,7 @@ private: /// @return error flag. /// @retval false on success. /// @retval true on error. - bool init_var_items(THD *thd); + bool init_var_items(THD *thd, List<Spvar_definition> &defs); /// Create an instance of appropriate Item_cache class depending on the /// specified type in the callers arena. @@ -357,8 +361,6 @@ private: /// @return Pointer to valid object on success, or NULL in case of error. Item_cache *create_case_expr_holder(THD *thd, const Item *item) const; - int set_variable(THD *thd, Field *field, Item **value); - private: /// Top-level (root) parsing context for this runtime context. const sp_pcontext *m_root_parsing_ctx; |