diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-03-07 21:05:28 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-03-07 21:05:28 +0100 |
commit | 12f54d7de0c641c16299808d7835ad34192cd601 (patch) | |
tree | 13ffd5ca13a64abedc6b4fce3a0e587adaf0620d /sql/sql_time.cc | |
parent | 68916bcab383a25a8f9eb2ae60bb8435b52e5094 (diff) | |
download | mariadb-git-12f54d7de0c641c16299808d7835ad34192cd601.tar.gz |
@@old_mode=zero_date_time_cast
Diffstat (limited to 'sql/sql_time.cc')
-rw-r--r-- | sql/sql_time.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_time.cc b/sql/sql_time.cc index 06098094505..2c4998fdf5e 100644 --- a/sql/sql_time.cc +++ b/sql/sql_time.cc @@ -1243,7 +1243,7 @@ time_to_datetime_old(THD *thd, const MYSQL_TIME *from, MYSQL_TIME *to) bool time_to_datetime(THD *thd, const MYSQL_TIME *from, MYSQL_TIME *to) { - if (thd->variables.old_mode) + if (thd->variables.old_behavior & OLD_MODE_ZERO_DATE_TIME_CAST) return time_to_datetime_old(thd, from, to); set_current_date(thd, to); mix_date_and_time(to, from); @@ -1266,7 +1266,8 @@ time_to_datetime_with_warn(THD *thd, only in the old mode. */ if (time_to_datetime(thd, from, to) || - (thd->variables.old_mode && check_date(to, fuzzydate, &warn))) + ((thd->variables.old_behavior && OLD_MODE_ZERO_DATE_TIME_CAST) && + check_date(to, fuzzydate, &warn))) { ErrConvTime str(from); make_truncated_value_warning(thd, Sql_condition::WARN_LEVEL_WARN, @@ -1274,4 +1275,4 @@ time_to_datetime_with_warn(THD *thd, return true; } return false; -}
\ No newline at end of file +} |