summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.h
diff options
context:
space:
mode:
authorSergey Glukhov <sergey.glukhov@oracle.com>2011-03-30 11:25:49 +0400
committerSergey Glukhov <sergey.glukhov@oracle.com>2011-03-30 11:25:49 +0400
commitabbe33eb927b0b283dc61095c0e85a661595c22c (patch)
tree383734ccaa4cb89e2c9e7f7026a066928be3f0d3 /sql/item_timefunc.h
parent517c5c247c217203e075a0f8b61e614e8dc6623f (diff)
parenta7d383cbb8db5478c1c53a025afda967ad09299b (diff)
downloadmariadb-git-abbe33eb927b0b283dc61095c0e85a661595c22c.tar.gz
5.1 -> 5.5 merge
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r--sql/item_timefunc.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 92e24d75111..ca1624c9082 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -144,8 +144,11 @@ public:
{ DBUG_ASSERT(fixed == 1); return (double) Item_func_month::val_int(); }
String *val_str(String *str)
{
- str->set(val_int(), collation.collation);
- return null_value ? 0 : str;
+ longlong nr= val_int();
+ if (null_value)
+ return 0;
+ str->set(nr, collation.collation);
+ return str;
}
const char *func_name() const { return "month"; }
enum Item_result result_type () const { return INT_RESULT; }