summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 60547d00a5c..778ea6e9496 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -605,7 +605,11 @@ class Item_func_unhex :public Item_str_func
{
String tmp_value;
public:
- Item_func_unhex(Item *a) :Item_str_func(a) {}
+ Item_func_unhex(Item *a) :Item_str_func(a)
+ {
+ /* there can be bad hex strings */
+ maybe_null= 1;
+ }
const char *func_name() const { return "unhex"; }
String *val_str(String *);
void fix_length_and_dec()