MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / my_TIME_to_str

Function my_TIME_to_str

sql/sql_time.cc:1078–1085  ·  view source on GitHub ↗

Convert TIME/DATE/DATETIME value to String. @param l_time DATE value @param OUT str String to conver to @param dec Number of fractional digits. */

Source from the content-addressed store, hash-verified

1076 @param dec Number of fractional digits.
1077*/
1078bool my_TIME_to_str(const MYSQL_TIME *ltime, String *str, uint dec)
1079{
1080 if (str->alloc(MAX_DATE_STRING_REP_LENGTH))
1081 return true;
1082 str->set_charset(&my_charset_numeric);
1083 str->length(my_TIME_to_str(ltime, const_cast<char*>(str->ptr()), dec));
1084 return false;
1085}
1086
1087
1088void make_truncated_value_warning(THD *thd,

Callers 4

cache_stringMethod · 0.70
ErrConvStringMethod · 0.70
val_strMethod · 0.70
query_val_strMethod · 0.70

Calls 4

allocMethod · 0.45
set_charsetMethod · 0.45
lengthMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected