From 12f54d7de0c641c16299808d7835ad34192cd601 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 7 Mar 2014 21:05:28 +0100 Subject: @@old_mode=zero_date_time_cast --- sql/item.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/item.cc') diff --git a/sql/item.cc b/sql/item.cc index 1c81fda9c63..0fbd58567ef 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -248,7 +248,8 @@ bool Item::get_date_with_conversion(MYSQL_TIME *ltime, ulonglong fuzzydate) and leave it to get_date() to check date. */ ulonglong time_flag= (field_type() == MYSQL_TYPE_TIME && - !current_thd->variables.old_mode) ? TIME_TIME_ONLY : 0; + !(current_thd->variables.old_behavior & OLD_MODE_ZERO_DATE_TIME_CAST)) ? + TIME_TIME_ONLY : 0; if (get_date(ltime, fuzzydate | time_flag)) return true; if (ltime->time_type == MYSQL_TIMESTAMP_TIME && -- cgit v1.2.1