Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
This task is a self-sufficient part of MDEV-16991.
In order to take into account nanoseconds during string-to-temporal conversion, these constructors:
Time(int *warn, const char *str, size_t len, CHARSET_INFO *cs, |
const Options opt); |
Datetime(int *warn, const char *str, size_t len, CHARSET_INFO *cs, |
sql_mode_t flags);
|
need to be changed to:
Time(MYSQL_TIME_STATUS *status, const char *str, size_t len, CHARSET_INFO *cs |
const Options opt); |
Datetime(MYSQL_TIME_STATUS *status,
|
const char *str, size_t len, CHARSET_INFO *cs, |
sql_mode_t flags);
|
i.e. the "int *warn" parameter needs to be changed to "MYSQL_TIME_STATUS *status".
Additionally, we'll move global character set aware functions:
/* Character set-aware version of str_to_time() */
|
bool str_to_time(CHARSET_INFO *cs, const char *str,size_t length, |
MYSQL_TIME *l_time, ulonglong fuzzydate,
|
MYSQL_TIME_STATUS *status);
|
/* Character set-aware version of str_to_datetime() */
|
bool str_to_datetime(CHARSET_INFO *cs, |
const char *str, size_t length, |
MYSQL_TIME *l_time, ulonglong flags,
|
MYSQL_TIME_STATUS *status);
|
as methods to class Temporal.
Attachments
Issue Links
- blocks
-
MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMP
- Closed