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

Function my_time_fraction_remainder

sql/sql_time.h:151–155  ·  view source on GitHub ↗

Date/time rounding and truncation functions */

Source from the content-addressed store, hash-verified

149
150/* Date/time rounding and truncation functions */
151inline long my_time_fraction_remainder(long nr, uint decimals)
152{
153 DBUG_ASSERT(decimals <= DATETIME_MAX_DECIMALS);
154 return nr % (long) log_10_int[DATETIME_MAX_DECIMALS - decimals];
155}
156inline void my_time_trunc(MYSQL_TIME *ltime, uint decimals)
157{
158 ltime->second_part-= my_time_fraction_remainder(ltime->second_part, decimals);

Callers 2

my_time_truncFunction · 0.85
my_timeval_truncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected