| 124 | } |
| 125 | |
| 126 | bool 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 | |
| 144 | bool String::copy() |
no test coverage detected