summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <ramil/ram@mysql.com/myoffice.izhnet.ru>2007-02-06 13:57:20 +0400
committerunknown <ramil/ram@mysql.com/myoffice.izhnet.ru>2007-02-06 13:57:20 +0400
commit61b286e4160d83be2dbd9edb92ef4ec359dccb6b (patch)
tree6a846f152b3fe7568c4a9df71317dcdfb627a653 /sql/item_timefunc.cc
parent2f0b1d658090e284acaec088eca9f7a6b5a4118b (diff)
parent665004c8e0a83e72b735acd2721b91cc9e15e8a4 (diff)
downloadmariadb-git-61b286e4160d83be2dbd9edb92ef4ec359dccb6b.tar.gz
Merge mysql.com:/usr/home/ram/work/bug23938/my41-bug23938
into mysql.com:/usr/home/ram/work/bug23938/my50-bug23938 sql/item_timefunc.cc: Auto merged mysql-test/r/cast.result: SCCS merged mysql-test/t/cast.test: SCCS merged
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index a776d8a5ff7..7d9215b0fb3 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2667,7 +2667,10 @@ longlong Item_date_typecast::val_int()
DBUG_ASSERT(fixed == 1);
TIME ltime;
if (args[0]->get_date(&ltime, TIME_FUZZY_DATE))
+ {
+ null_value= 1;
return 0;
+ }
return (longlong) (ltime.year * 10000L + ltime.month * 100 + ltime.day);
}