Date/time rounding and truncation functions */
| 149 | |
| 150 | /* Date/time rounding and truncation functions */ |
| 151 | inline 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 | } |
| 156 | inline void my_time_trunc(MYSQL_TIME *ltime, uint decimals) |
| 157 | { |
| 158 | ltime->second_part-= my_time_fraction_remainder(ltime->second_part, decimals); |
no outgoing calls
no test coverage detected