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

Function my_decimal2int

sql/my_decimal.h:372–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370#endif
371
372inline
373int 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
385inline

Callers 3

val_intMethod · 0.85
val_int_from_decimalMethod · 0.85
val_intMethod · 0.85

Calls 4

decimal_roundFunction · 0.85
check_resultFunction · 0.85
decimal2ulonglongFunction · 0.85
decimal2longlongFunction · 0.85

Tested by

no test coverage detected