summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/item_timefunc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 670fb94fc2c..5fdbd968df1 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -906,9 +906,9 @@ String* Item_func_monthname::val_str(String* str)
{
DBUG_ASSERT(fixed == 1);
const char *month_name;
- uint month=(uint) Item_func_month::val_int();
+ uint month= (uint) val_int();
- if (!month) // This is also true for NULL
+ if (null_value || !month)
{
null_value=1;
return (String*) 0;