diff options
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index b7ad8c5c906..aed19b76011 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -1013,8 +1013,7 @@ subst_spvars(THD *thd, sp_instr *instr, LEX_STRING *query_str) else DBUG_RETURN(TRUE); - thd->query= pbuf; - thd->query_length= qbuf.length(); + thd->set_query(pbuf, qbuf.length()); DBUG_RETURN(FALSE); } @@ -1250,7 +1249,7 @@ sp_head::execute(THD *thd) */ if (thd->prelocked_mode == NON_PRELOCKED) thd->user_var_events_alloc= thd->mem_root; - + err_status= i->execute(thd, &ip); if (i->free_list) @@ -2859,14 +2858,13 @@ sp_instr_stmt::execute(THD *thd, uint *nextp) } else *nextp= m_ip+1; - thd->query= query; - thd->query_length= query_length; + thd->set_query(query, query_length); thd->query_name_consts= 0; if (!thd->is_error()) thd->main_da.reset_diagnostics_area(); } - DBUG_RETURN(res); + DBUG_RETURN(res || thd->is_error()); } |