From 4d57bfdd485f45729031295295d78117fc5b3509 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 11 Jul 2013 23:16:33 +0200 Subject: temporal-related changes. don't apply sql_mode flags on the lower level (str_to_datetime), do it on the upper level, in items that return temporal values. update tests results to match 5.6 better and to fix old bugs. --- sql/sql_time.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sql/sql_time.cc') diff --git a/sql/sql_time.cc b/sql/sql_time.cc index e989ce6f3a0..6f15ada2dcd 100644 --- a/sql/sql_time.cc +++ b/sql/sql_time.cc @@ -295,9 +295,7 @@ str_to_datetime_with_warn(CHARSET_INFO *cs, THD *thd= current_thd; timestamp_type ts_type; - ts_type= str_to_datetime(cs, str, length, l_time, - (flags | (sql_mode_for_dates(thd))), - &was_cut); + ts_type= str_to_datetime(cs, str, length, l_time, flags, &was_cut); if (was_cut || ts_type <= MYSQL_TIMESTAMP_ERROR) make_truncated_value_warning(thd, Sql_condition::WARN_LEVEL_WARN, str, length, flags & TIME_TIME_ONLY ? -- cgit v1.2.1