mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-4841 Wrong character set of ADDTIME() and DATE_ADD()
This commit is contained in:
@ -813,6 +813,23 @@ const char *get_date_time_format_str(KNOWN_DATE_TIME_FORMAT *format,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Convert TIME/DATE/DATETIME value to String.
|
||||
@param l_time DATE value
|
||||
@param OUT str String to convert to
|
||||
@param dec Number of fractional digits.
|
||||
*/
|
||||
bool my_TIME_to_str(const MYSQL_TIME *ltime, String *str, uint dec)
|
||||
{
|
||||
if (str->alloc(MAX_DATE_STRING_REP_LENGTH))
|
||||
return true;
|
||||
str->set_charset(&my_charset_numeric);
|
||||
str->length(my_TIME_to_str(ltime, const_cast<char*>(str->ptr()), dec));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void make_truncated_value_warning(THD *thd,
|
||||
Sql_condition::enum_warning_level level,
|
||||
const ErrConv *sval,
|
||||
|
Reference in New Issue
Block a user