diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-07-31 23:00:02 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-07-31 23:00:02 +0400 |
commit | c9218ff43989bf2385d1f62b45ed1f6229cbc5a5 (patch) | |
tree | a99c10f5e304662f3b51141871f94ee64eebaee6 /sql/sql_lex.cc | |
parent | 4937474f862010c90f76bf879a70c1edf17e7c85 (diff) | |
download | mariadb-git-c9218ff43989bf2385d1f62b45ed1f6229cbc5a5.tar.gz |
MDEV-13415 Wrap the code in sp.cc into a class Sp_handler
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 144ff021ea3..ebaa0ee6eb5 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -5149,7 +5149,7 @@ bool LEX::init_internal_variable(struct sys_var_with_base *variable, bool LEX::is_trigger_new_or_old_reference(const LEX_CSTRING *name) { - return sphead && sphead->m_type == TYPE_ENUM_TRIGGER && + return sphead && sphead->m_handler->type() == TYPE_ENUM_TRIGGER && name->length == 3 && (!my_strcasecmp(system_charset_info, name->str, "NEW") || !my_strcasecmp(system_charset_info, name->str, "OLD")); @@ -5825,13 +5825,13 @@ sp_name *LEX::make_sp_name(THD *thd, LEX_CSTRING *name1, LEX_CSTRING *name2) } -sp_head *LEX::make_sp_head(THD *thd, sp_name *name, - enum stored_procedure_type type) +sp_head *LEX::make_sp_head(THD *thd, const sp_name *name, + const Sp_handler *sph) { sp_head *sp; /* Order is important here: new - reset - init */ - if ((sp= new sp_head(type))) + if ((sp= new sp_head(sph))) { sp->reset_thd_mem_root(thd); sp->init(this); @@ -6127,7 +6127,7 @@ bool LEX::maybe_start_compound_statement(THD *thd) { if (!sphead) { - if (!make_sp_head(thd, NULL, TYPE_ENUM_PROCEDURE)) + if (!make_sp_head(thd, NULL, &sp_handler_procedure)) return true; sphead->set_suid(SP_IS_NOT_SUID); sphead->set_body_start(thd, thd->m_parser_state->m_lip.get_cpp_ptr()); |