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

Function date_time_format_make

sql/sql_time.cc:918–933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

916*/
917
918DATE_TIME_FORMAT
919*date_time_format_make(timestamp_type format_type,
920 const char *format_str, uint format_length)
921{
922 DATE_TIME_FORMAT tmp;
923
924 if (format_length && format_length < 255 &&
925 !parse_date_time_format(format_type, format_str,
926 format_length, &tmp))
927 {
928 tmp.format.str= (char*) format_str;
929 tmp.format.length= format_length;
930 return date_time_format_copy((THD *)0, &tmp);
931 }
932 return 0;
933}
934
935
936/*

Callers

nothing calls this directly

Calls 2

date_time_format_copyFunction · 0.85
parse_date_time_formatFunction · 0.70

Tested by

no test coverage detected