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

Method set_real

sql/sql_string.cc:126–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126bool String::set_real(double num,uint decimals, const CHARSET_INFO *cs)
127{
128 char buff[FLOATING_POINT_BUFFER];
129 uint dummy_errors;
130 size_t len;
131
132 str_charset=cs;
133 if (decimals >= NOT_FIXED_DEC)
134 {
135 len= my_gcvt(num, MY_GCVT_ARG_DOUBLE, sizeof(buff) - 1, buff, NULL);
136 return copy(buff, len, &my_charset_latin1, cs, &dummy_errors);
137 }
138 len= my_fcvt(num, decimals, buff, NULL);
139 return copy(buff, (uint32) len, &my_charset_latin1, cs,
140 &dummy_errors);
141}
142
143
144bool String::copy()

Callers 15

val_str_asciiMethod · 0.80
val_strMethod · 0.80
storeMethod · 0.80
avgMethod · 0.80
get_min_argMethod · 0.80
get_max_argMethod · 0.80
avgMethod · 0.80
stdMethod · 0.80
avgMethod · 0.80
stdMethod · 0.80
avgMethod · 0.80
stdMethod · 0.80

Calls 3

my_gcvtFunction · 0.85
copyFunction · 0.85
my_fcvtFunction · 0.85

Tested by

no test coverage detected