summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@gleb.loc>2007-07-21 02:25:39 +0500
committerunknown <gshchepa/uchum@gleb.loc>2007-07-21 02:25:39 +0500
commitd9bad2acc0fa78f77e2c05bd54a04063a26e71b2 (patch)
treeb0ab67b6bfdb14f09b6d4b01f876f24a827986d0 /sql/item_timefunc.cc
parentd3294a6051558535f8895a2b2f8512e0749a155c (diff)
parentd758b1e629a78e1cf58c8a04da51e3c33630368c (diff)
downloadmariadb-git-d9bad2acc0fa78f77e2c05bd54a04063a26e71b2.tar.gz
Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into gleb.loc:/home/uchum/work/bk/5.1-opt mysql-test/r/cast.result: Auto merged mysql-test/t/cast.test: Auto merged sql/item_timefunc.cc: Auto merged
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 95ff7dfd336..a87efa9e68c 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2534,11 +2534,8 @@ longlong Item_date_typecast::val_int()
{
DBUG_ASSERT(fixed == 1);
MYSQL_TIME ltime;
- if (args[0]->get_date(&ltime, TIME_FUZZY_DATE))
- {
- null_value= 1;
+ if ((null_value= args[0]->get_date(&ltime, TIME_FUZZY_DATE)))
return 0;
- }
return (longlong) (ltime.year * 10000L + ltime.month * 100 + ltime.day);
}