| 8213 | |
| 8214 | |
| 8215 | sp_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 | |
| 8247 | sp_head *LEX::make_sp_head_no_recursive(THD *thd, const sp_name *name, |
nothing calls this directly
no test coverage detected