summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/item_func.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 1af49179aee..d4b7af68c3b 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -2468,8 +2468,9 @@ bool Item_func_set_user_var::update_hash(void *ptr, uint length,
char *pos= (char*) entry+ ALIGN_SIZE(sizeof(user_var_entry));
if (entry->value == pos)
entry->value=0;
- if (!(entry->value=(char*) my_realloc(entry->value, length,
- MYF(MY_ALLOW_ZERO_PTR))))
+ entry->value= (char*) my_realloc(entry->value, length,
+ MYF(MY_ALLOW_ZERO_PTR | MY_WME));
+ if (!entry->value)
goto err;
}
}