MCPcopy Create free account
hub / github.com/MariaDB/server / make_sp_head

Method make_sp_head

sql/sql_lex.cc:8215–8244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8213
8214
8215sp_head *LEX::make_sp_head(THD *thd, const sp_name *name,
8216 const Sp_handler *sph,
8217 enum_sp_aggregate_type agg_type)
8218{
8219 sp_package *package= get_sp_package();
8220 sp_head *sp;
8221
8222 /* Order is important here: new - reset - init */
8223 if ((sp= sp_head::create(package, sph, agg_type, thd->variables.sql_mode,
8224 thd->variables.path, sp_mem_root_ptr)))
8225 {
8226 sp->reset_thd_mem_root(thd);
8227 sp->init(this);
8228 if (name)
8229 {
8230 if (package)
8231 sp->make_package_routine_name(sp->get_main_mem_root(), package->m_db,
8232 package->m_name, name->m_name);
8233 else
8234 sp->init_sp_name(name);
8235 if (!(sp->m_qname=
8236 sp->to_identifier_chain2().
8237 make_qname_casedn_part1(sp->get_main_mem_root())).str)
8238 return NULL;
8239 }
8240 sphead= sp;
8241 }
8242 sp_chistics.init();
8243 return sp;
8244}
8245
8246
8247sp_head *LEX::make_sp_head_no_recursive(THD *thd, const sp_name *name,

Callers

nothing calls this directly

Calls 8

createFunction · 0.85
reset_thd_mem_rootMethod · 0.80
get_main_mem_rootMethod · 0.80
init_sp_nameMethod · 0.80
to_identifier_chain2Method · 0.80
initMethod · 0.45

Tested by

no test coverage detected