diff options
author | Michael Widenius <monty@askmonty.org> | 2011-05-03 19:10:10 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-05-03 19:10:10 +0300 |
commit | 1be5462d59fa5fbd1ca92286c3a0a049c00f4bb9 (patch) | |
tree | 17ba1ed90233efa64bc83364ed1ffb74dd637ead /sql/item_timefunc.h | |
parent | ce55d37929fc91b476541d3a77336a44b20317ac (diff) | |
parent | 90e058e0c623f770ee602ebab86e91303f08c90a (diff) | |
download | mariadb-git-1be5462d59fa5fbd1ca92286c3a0a049c00f4bb9.tar.gz |
Merge with MariaDB 5.1
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 87af384923e..2d499f6ef0e 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. + Copyright (c) 2009-2011, Monty Program Ab 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 @@ -108,8 +109,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; } |