diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-02-01 00:54:03 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-02-01 00:54:03 +0100 |
commit | 59d9d08e2b6f6f35e781d24c47d33d26fb4ba2a5 (patch) | |
tree | 3e4a302ccf3912d4d8a40aa271414003bfe7c9b6 /sql/sql_time.cc | |
parent | ce02738d7f2f2688eeec7004dd6a30293d36044f (diff) | |
parent | 6b6d40fa6ca1fe36f2a51c2723c58dfb3fc025bb (diff) | |
download | mariadb-git-59d9d08e2b6f6f35e781d24c47d33d26fb4ba2a5.tar.gz |
5.5 merge
Diffstat (limited to 'sql/sql_time.cc')
-rw-r--r-- | sql/sql_time.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sql_time.cc b/sql/sql_time.cc index cf3cdd61000..507e77e7b2d 100644 --- a/sql/sql_time.cc +++ b/sql/sql_time.cc @@ -230,6 +230,20 @@ check_date_with_warn(const MYSQL_TIME *ltime, ulonglong fuzzy_date, } +bool +adjust_time_range_with_warn(MYSQL_TIME *ltime, uint dec) +{ + MYSQL_TIME copy= *ltime; + ErrConvTime str(©); + int warnings= 0; + if (check_time_range(ltime, dec, &warnings)) + return true; + if (warnings) + make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + &str, MYSQL_TIMESTAMP_TIME, NullS); + return false; +} + /* Convert a string to 8-bit representation, for use in str_to_time/str_to_date/str_to_date. |