diff options
author | Alexander Barkov <bar@mariadb.org> | 2013-06-28 15:20:40 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2013-06-28 15:20:40 +0400 |
commit | f13236be86472d3d69660c1c762b5dbc01ec644b (patch) | |
tree | 2712ba963aec92e65e34a51bec65354d0937ef5b /sql/sql_time.cc | |
parent | d058863d8e0162aa3a4ea571416c03903c92687b (diff) | |
parent | 0e44faf27ff243f8e8c1432568eef21964ad326c (diff) | |
download | mariadb-git-f13236be86472d3d69660c1c762b5dbc01ec644b.tar.gz |
Merge from 5.3
modified:
mysql-test/r/type_date.result
mysql-test/r/type_datetime.result
mysql-test/r/type_time.result
mysql-test/t/type_date.test
mysql-test/t/type_datetime.test
mysql-test/t/type_time.test
sql/item_func.cc
sql/item_timefunc.cc
sql/sql_time.cc
sql/sql_time.h
pending merges:
Alexander Barkov 2013-06-28 MDEV-4634 Crash in CONVERT_TZ
Diffstat (limited to 'sql/sql_time.cc')
-rw-r--r-- | sql/sql_time.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/sql_time.cc b/sql/sql_time.cc index dadf579b2e7..82e8898657d 100644 --- a/sql/sql_time.cc +++ b/sql/sql_time.cc @@ -214,6 +214,22 @@ ulong convert_month_to_period(ulong month) } +bool +check_date_with_warn(const MYSQL_TIME *ltime, ulonglong fuzzy_date, + timestamp_type ts_type) +{ + int dummy_warnings; + if (check_date(ltime, fuzzy_date, &dummy_warnings)) + { + ErrConvTime str(ltime); + make_truncated_value_warning(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + &str, ts_type, 0); + return true; + } + return false; +} + + /* Convert a string to 8-bit representation, for use in str_to_time/str_to_date/str_to_date. |