diff options
author | ramil@mysql.com <> | 2006-04-25 14:34:19 +0500 |
---|---|---|
committer | ramil@mysql.com <> | 2006-04-25 14:34:19 +0500 |
commit | 8cdd68a83051e56afecd8f9bb1b75ae6428b02c5 (patch) | |
tree | 452dbe7efd2b3122541222a471a692048acad12c /sql/item_timefunc.cc | |
parent | 19f134e40b6898e8a70f5780bd7a546f25a5aa3d (diff) | |
download | mariadb-git-8cdd68a83051e56afecd8f9bb1b75ae6428b02c5.tar.gz |
Fix for bug #18501: Server crashes with monthname().
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index f3d6858755c..ffd8c79dca8 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -905,9 +905,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; |