| 370 | #endif |
| 371 | |
| 372 | inline |
| 373 | int my_decimal2int(uint mask, const my_decimal *d, my_bool unsigned_flag, |
| 374 | longlong *l) |
| 375 | { |
| 376 | my_decimal rounded; |
| 377 | /* decimal_round can return only E_DEC_TRUNCATED */ |
| 378 | decimal_round(d, &rounded, 0, HALF_UP); |
| 379 | return check_result(mask, (unsigned_flag ? |
| 380 | decimal2ulonglong(&rounded, (ulonglong *)l) : |
| 381 | decimal2longlong(&rounded, l))); |
| 382 | } |
| 383 | |
| 384 | |
| 385 | inline |
no test coverage detected