| 5036 | */ |
| 5037 | |
| 5038 | bool 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 | /* |
no test coverage detected