summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2007-07-16 00:59:47 +0400
committerunknown <evgen@moonbone.local>2007-07-16 00:59:47 +0400
commit3e925554ece25332a21125233a13c0e10253d482 (patch)
tree4c8fb022dfe0c6acfcb5e44374bfa4173bb4da4c /sql/item_cmpfunc.cc
parent16135c7dca88e7ed0d78bf2e5d5cc748d6320dfb (diff)
downloadmariadb-git-3e925554ece25332a21125233a13c0e10253d482.tar.gz
item_cmpfunc.cc:
Fixed compiler warning. sql/item_cmpfunc.cc: Fixed compiler warning.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 161a3f7bb19..a89f6337f5f 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -707,8 +707,7 @@ get_time_value(THD *thd, Item ***item_arg, Item **cache_arg,
else
{
*is_null= item->get_time(&ltime);
- if (!is_null)
- value= TIME_to_ulonglong_datetime(&ltime);
+ value= !is_null ? TIME_to_ulonglong_datetime(&ltime) : 0;
}
/*
Do not cache GET_USER_VAR() function as its const_item() may return TRUE