summaryrefslogtreecommitdiff
path: root/sql/sp_rcontext.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r--sql/sp_rcontext.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc
index 0b2b20fe3b3..7fa44f217f6 100644
--- a/sql/sp_rcontext.cc
+++ b/sql/sp_rcontext.cc
@@ -40,12 +40,19 @@ sp_rcontext::sp_rcontext(uint fsize, uint hmax, uint cmax)
m_saved.empty();
}
-void
+int
sp_rcontext::set_item_eval(uint idx, Item *i, enum_field_types type)
{
extern Item *sp_eval_func_item(THD *thd, Item *it, enum_field_types type);
+ Item *it= sp_eval_func_item(current_thd, i, type);
- set_item(idx, sp_eval_func_item(current_thd, i, type));
+ if (! it)
+ return -1;
+ else
+ {
+ set_item(idx, it);
+ return 0;
+ }
}
int