summaryrefslogtreecommitdiff
path: root/sql/sql_time.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-07-11 23:16:33 +0200
committerSergei Golubchik <sergii@pisem.net>2013-07-11 23:16:33 +0200
commit4d57bfdd485f45729031295295d78117fc5b3509 (patch)
tree07e73d6239c236adb274afe23ebb6734d2546c43 /sql/sql_time.cc
parent82403c0bb1c084b00670a51e0555920286512f2e (diff)
downloadmariadb-git-4d57bfdd485f45729031295295d78117fc5b3509.tar.gz
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.
Diffstat (limited to 'sql/sql_time.cc')
-rw-r--r--sql/sql_time.cc4
1 files changed, 1 insertions, 3 deletions
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 ?