summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authormsvensson@pilot.mysql.com <>2007-02-06 15:50:24 +0100
committermsvensson@pilot.mysql.com <>2007-02-06 15:50:24 +0100
commit6ba81ba5eb6e62167beb5deff001dfd6ba7f3f5f (patch)
tree98887a74b2502a1c8d29b74ec9582d57c5314a40 /sql/item_timefunc.cc
parent15008f6728cfd8aedb38bde1caf9fba999b0672a (diff)
parentf7e566c9441dd578bb55c8bd2cf3bd15e83fb2aa (diff)
downloadmariadb-git-6ba81ba5eb6e62167beb5deff001dfd6ba7f3f5f.tar.gz
Merge 192.168.0.10:mysql/mysql-5.1-maint
into pilot.mysql.com:/home/msvensson/mysql/mysql-5.1-new-maint
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 bcfdd403acf..00f077839c3 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2531,7 +2531,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);
}