summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 49bce381901..b305b5ccec3 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -135,7 +135,11 @@ String* Item_func_monthname::val_str(String* str)
{
uint month=(uint) Item_func_month::val_int();
if (!month) // This is also true for NULL
+ {
+ null_value=1;
return (String*) 0;
+ }
+ null_value=0;
return &month_names[month-1];
}