summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index ee00d45ecb8..eb7062aa8bc 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -3806,6 +3806,13 @@ static user_var_entry *get_variable(HASH *hash, LEX_STRING &name,
}
+void Item_func_set_user_var::cleanup()
+{
+ Item_func::cleanup();
+ entry= NULL;
+}
+
+
bool Item_func_set_user_var::set_entry(THD *thd, bool create_if_not_exists)
{
if (entry && thd->thread_id == entry_thread_id)
@@ -4310,6 +4317,15 @@ my_decimal *Item_func_set_user_var::val_decimal_result(my_decimal *val)
}
+bool Item_func_set_user_var::is_null_result()
+{
+ DBUG_ASSERT(fixed == 1);
+ check(TRUE);
+ update(); // Store expression
+ return is_null();
+}
+
+
void Item_func_set_user_var::print(String *str, enum_query_type query_type)
{
str->append(STRING_WITH_LEN("(@"));