summaryrefslogtreecommitdiff
path: root/sql/sql_time.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2018-02-04 22:55:54 +0400
committerAlexander Barkov <bar@mariadb.org>2018-02-04 22:55:54 +0400
commitd67dcb7bb5f8058a1c6c2f44b8b31faeefdca94b (patch)
treedfa87014753c400225520cf8fb5a9ebc6db3eb82 /sql/sql_time.cc
parent28d4cf0c1b3366c6471866d144ef28fced1e5390 (diff)
downloadmariadb-git-d67dcb7bb5f8058a1c6c2f44b8b31faeefdca94b.tar.gz
MDEV-15205 Remove mysql_type_to_time_type()
Diffstat (limited to 'sql/sql_time.cc')
-rw-r--r--sql/sql_time.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/sql_time.cc b/sql/sql_time.cc
index 24aa7b1b8a6..986be049810 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;