Commit 2966c1e4 authored by Alexander Barkov's avatar Alexander Barkov

Fixing size_t to uint conversion failure on Windows

Since MDEV-15091, the "lengh" parameter to str_to_time()
and str_to_datetime() is of type size_t rather than uint.
Fixing Time(), Temporal_with_date() and Datetime() constructors accordingly.
parent 597dcbda
......@@ -700,7 +700,7 @@ class Time: public Temporal
make_from_item(&warn, item, opt);
}
Time(int *warn, const MYSQL_TIME *from, long curdays);
Time(int *warn, const char *str, uint len, CHARSET_INFO *cs,
Time(int *warn, const char *str, size_t len, CHARSET_INFO *cs,
const Options opt)
{
MYSQL_TIME_STATUS status;
......@@ -856,7 +856,7 @@ class Temporal_with_date: public Temporal
if (nr.to_datetime(this, flags, warn))
time_type= MYSQL_TIMESTAMP_NONE;
}
Temporal_with_date(int *warn, const char *str, uint len, CHARSET_INFO *cs,
Temporal_with_date(int *warn, const char *str, size_t len, CHARSET_INFO *cs,
sql_mode_t flags)
{
DBUG_ASSERT((flags & TIME_TIME_ONLY) == 0);
......@@ -1022,7 +1022,7 @@ class Datetime: public Temporal_with_date
{
set_zero_time(this, MYSQL_TIMESTAMP_DATETIME);
}
Datetime(int *warn, const char *str, uint len, CHARSET_INFO *cs,
Datetime(int *warn, const char *str, size_t len, CHARSET_INFO *cs,
sql_mode_t flags)
:Temporal_with_date(warn, str, len, cs, flags)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment