From 1f776e9f24029d1620fa6b67a7f9945cb504ae8f Mon Sep 17 00:00:00 2001
From: Alexander Barkov <alexander.barkov@oracle.com>
Date: Tue, 24 Jan 2012 13:00:13 +0400
Subject: BUG#13458237 - INCONSISTENT HANDLING OF INVALIDE DATES WITH ZERO DAY.
 SIMILAR TO '2009-10-00' - Reverting the patch for Bug # 12584302   The patch
 will be reverted in 5.1 and 5.5.   The patch will not be reverted in 5.6, the
 change will   be properly documented in 5.6. - Backporting DBUG_ASSERT not to
 crash on '0000-01-00'   (already fixed in mysql-trunk (5.6))

---
 sql/item_timefunc.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'sql/item_timefunc.cc')

diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 31474f1d6ca..83b0b7cdebc 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2646,7 +2646,7 @@ String *Item_time_typecast::val_str(String *str)
 
 bool Item_date_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
 {
-  bool res= get_arg0_date(ltime, fuzzy_date);
+  bool res= get_arg0_date(ltime, TIME_FUZZY_DATE);
   ltime->hour= ltime->minute= ltime->second= ltime->second_part= 0;
   ltime->time_type= MYSQL_TIMESTAMP_DATE;
   return res;
-- 
cgit v1.2.1