diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-11-19 21:48:08 -0200 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-11-19 21:48:08 -0200 |
commit | 5aeeaaf507ac87f6ff56806fe8a356cea7d4a48f (patch) | |
tree | d21225ac09b301f317ca89093128769a5ede9fbb /sql/item_cmpfunc.cc | |
parent | 780871d8b90fe3146db39b4be65ebedb309b9f9b (diff) | |
parent | 5128b54c38ae183d18a29e00b318c22046445715 (diff) | |
download | mariadb-git-5aeeaaf507ac87f6ff56806fe8a356cea7d4a48f.tar.gz |
Manual merge of mysql-next-mr-runtime upstream.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index c6b88cd8188..981b4bf0b92 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -855,7 +855,8 @@ get_time_value(THD *thd, Item ***item_arg, Item **cache_arg, else { *is_null= item->get_time(<ime); - value= !*is_null ? (longlong) TIME_to_ulonglong_datetime(<ime) : 0; + value= !*is_null ? (longlong) TIME_to_ulonglong_datetime(<ime) * + (ltime.neg ? -1 : 1) : 0; } /* Do not cache GET_USER_VAR() function as its const_item() may return TRUE |