diff options
author | Kent Boortz <kent.boortz@oracle.com> | 2011-07-03 17:47:37 +0200 |
---|---|---|
committer | Kent Boortz <kent.boortz@oracle.com> | 2011-07-03 17:47:37 +0200 |
commit | 027b5f1ed4f0130bbbc174eb45162a402c65f43f (patch) | |
tree | 448d397ed328f719a29a8fbbd54df8d943ed7274 /sql/item_timefunc.h | |
parent | 68f00a56868c5ca21b2d51598e1a43969ecf4896 (diff) | |
parent | dd4957965411c1b67ebfb1ba8650a3090d305f63 (diff) | |
download | mariadb-git-027b5f1ed4f0130bbbc174eb45162a402c65f43f.tar.gz |
Updated/added copyright headers
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index e930a24d2b0..0852629b1ae 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -107,8 +107,11 @@ public: { DBUG_ASSERT(fixed == 1); return (double) Item_func_month::val_int(); } String *val_str(String *str) { - str->set(val_int(), &my_charset_bin); - return null_value ? 0 : str; + longlong nr= val_int(); + if (null_value) + return 0; + str->set(nr, &my_charset_bin); + return str; } const char *func_name() const { return "month"; } enum Item_result result_type () const { return INT_RESULT; } |