diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-06 17:12:17 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-06 17:12:17 +0200 |
commit | 883496782f37cd53acd10d90527af97aca3fd34f (patch) | |
tree | 36c2d3a7cf10df47651a2dc35144afd475beeabe /sql/sql_time.cc | |
parent | eda142590f385b3d79e7b6a6e0cc13ba8fd25961 (diff) | |
parent | 560b9895d413bdfedda0a0ca871a635858990c05 (diff) | |
download | mariadb-git-883496782f37cd53acd10d90527af97aca3fd34f.tar.gz |
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'sql/sql_time.cc')
-rw-r--r-- | sql/sql_time.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/sql_time.cc b/sql/sql_time.cc index 0dfb1c4d88b..751a8926f33 100644 --- a/sql/sql_time.cc +++ b/sql/sql_time.cc @@ -357,19 +357,19 @@ static bool number_to_time_with_warn(bool neg, ulonglong nr, ulong sec_part, { int was_cut; longlong res; - enum_field_types f_type; + enum_mysql_timestamp_type ts_type; bool have_warnings; if (fuzzydate & TIME_TIME_ONLY) { fuzzydate= TIME_TIME_ONLY; // clear other flags - f_type= MYSQL_TYPE_TIME; + ts_type= MYSQL_TIMESTAMP_TIME; res= number_to_time(neg, nr, sec_part, ltime, &was_cut); have_warnings= MYSQL_TIME_WARN_HAVE_WARNINGS(was_cut); } else { - f_type= MYSQL_TYPE_DATETIME; + ts_type= MYSQL_TIMESTAMP_DATETIME; if (neg) { res= -1; @@ -385,8 +385,7 @@ static bool number_to_time_with_warn(bool neg, ulonglong nr, ulong sec_part, { make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, str, - res < 0 ? MYSQL_TIMESTAMP_ERROR - : mysql_type_to_time_type(f_type), + res < 0 ? MYSQL_TIMESTAMP_ERROR : ts_type, field_name); } return res < 0; |