diff options
author | unknown <ramil@mysql.com> | 2006-05-02 18:00:44 +0500 |
---|---|---|
committer | unknown <ramil@mysql.com> | 2006-05-02 18:00:44 +0500 |
commit | 409fb4895fd08e876b33c4d809919952871996a9 (patch) | |
tree | c3591641668aa04d2b41738ae65c6deec419c395 /sql/item_timefunc.cc | |
parent | 38b1f7c7c3790a6ee59dd213eab16fe9c6fd97f4 (diff) | |
download | mariadb-git-409fb4895fd08e876b33c4d809919952871996a9.tar.gz |
Fix for bug #16546: DATETIME+0 not always coerced the same way
mysql-test/r/func_time.result:
Fix for bug #16546: DATETIME+0 not always coerced the same way
- test case
mysql-test/t/func_time.test:
Fix for bug #16546: DATETIME+0 not always coerced the same way
- test case
sql/item_timefunc.cc:
Fix for bug #16546: DATETIME+0 not always coerced the same way
- set decimals to DATETIME_DEC
sql/item_timefunc.h:
Fix for bug #16546: DATETIME+0 not always coerced the same way
- set decimals to DATETIME_DEC
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index f3d6858755c..34850d4efdd 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -1372,7 +1372,7 @@ void Item_func_curtime::fix_length_and_dec() { TIME ltime; - decimals=0; + decimals= DATETIME_DEC; collation.set(&my_charset_bin); store_now_in_TIME(<ime); value= TIME_to_ulonglong_time(<ime); @@ -1419,7 +1419,7 @@ String *Item_func_now::val_str(String *str) void Item_func_now::fix_length_and_dec() { - decimals=0; + decimals= DATETIME_DEC; collation.set(&my_charset_bin); store_now_in_TIME(<ime); @@ -1680,7 +1680,7 @@ void Item_func_from_unixtime::fix_length_and_dec() { thd= current_thd; collation.set(&my_charset_bin); - decimals=0; + decimals= DATETIME_DEC; max_length=MAX_DATETIME_WIDTH*MY_CHARSET_BIN_MB_MAXLEN; maybe_null= 1; thd->time_zone_used= 1; |