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

Method handle_routine

sql/sql_base.cc:5038–5061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5036*/
5037
5038bool DML_prelocking_strategy::handle_routine(THD *thd,
5039 Query_tables_list *prelocking_ctx, Sroutine_hash_entry *rt,
5040 sp_head *sp, bool *need_prelocking)
5041{
5042 /*
5043 We assume that for any "CALL proc(...)" statement sroutines_list will
5044 have 'proc' as first element (it may have several, consider e.g.
5045 "proc(sp_func(...)))". This property is currently guaranteed by the
5046 parser.
5047 */
5048
5049 if (rt != (Sroutine_hash_entry*)prelocking_ctx->sroutines_list.first ||
5050 rt->mdl_request.key.mdl_namespace() != MDL_key::PROCEDURE)
5051 {
5052 *need_prelocking= TRUE;
5053 sp_update_stmt_used_routines(thd, prelocking_ctx, &sp->m_sroutines,
5054 rt->belong_to_view);
5055 (void)sp->add_used_tables_to_table_list(thd,
5056 &prelocking_ctx->query_tables_last,
5057 rt->belong_to_view);
5058 }
5059 sp->propagate_attributes(prelocking_ctx);
5060 return FALSE;
5061}
5062
5063
5064/*

Callers 1

open_and_process_routineFunction · 0.45

Calls 4

mdl_namespaceMethod · 0.80
propagate_attributesMethod · 0.80

Tested by

no test coverage detected