1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-17331 Reuse Temporal_hybrid in xxx_to_date_with_warn()

This commit is contained in:
Alexander Barkov
2018-10-01 15:05:19 +04:00
parent e5aebc1408
commit 55dd077656
2 changed files with 38 additions and 17 deletions

View File

@ -500,6 +500,12 @@ public:
if (str_to_datetime(st, str, length, cs, fuzzydate))
time_type= MYSQL_TIMESTAMP_NONE;
}
Temporal_hybrid(THD *thd, const Sec6 &sec, date_mode_t fuzzydate,
const ErrConv *str, const char *field_name)
{
if (sec.convert_to_mysql_time(thd, this, fuzzydate, str, field_name))
time_type= MYSQL_TIMESTAMP_NONE;
}
longlong to_longlong() const
{
if (!is_valid_temporal())