summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-11-19 21:48:08 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-11-19 21:48:08 -0200
commit5aeeaaf507ac87f6ff56806fe8a356cea7d4a48f (patch)
treed21225ac09b301f317ca89093128769a5ede9fbb /sql/item_cmpfunc.cc
parent780871d8b90fe3146db39b4be65ebedb309b9f9b (diff)
parent5128b54c38ae183d18a29e00b318c22046445715 (diff)
downloadmariadb-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.cc3
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(&ltime);
- value= !*is_null ? (longlong) TIME_to_ulonglong_datetime(&ltime) : 0;
+ value= !*is_null ? (longlong) TIME_to_ulonglong_datetime(&ltime) *
+ (ltime.neg ? -1 : 1) : 0;
}
/*
Do not cache GET_USER_VAR() function as its const_item() may return TRUE