summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2009-08-12 15:44:34 +0200
committerGuilhem Bichot <guilhem@mysql.com>2009-08-12 15:44:34 +0200
commiteceba8912c9af415f9704bb671ddb4022eb8d9fc (patch)
tree5fdae14ec96fd61b574fe1c8b2d62d304114c53c /sql/sp_head.cc
parente44bda225abd5a736999b9c73ac88e059d823c2d (diff)
parent6e7de781d73b8967f1ab9e6c076795dd83429a80 (diff)
downloadmariadb-git-eceba8912c9af415f9704bb671ddb4022eb8d9fc.tar.gz
merge of 5.1-main into mysql-trunk.
Changes to ha_innodb.cc are not propagated to plugin, they will come back via Oracle/Innobase if needed.
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc10
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());
}