1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

A cleanup for MDEV-16852

Changing data types for:
- seconds from longlong to ulonglong
- microseconds from long to ulong
in:
- parameters of calc_time_diff()
- parameters of calc_time_from_sec()
- Members of Sec6_add

This will help to reuse the code easier:
all other functions use ulonglong+long
for seconds/microsecond, e.g.:

- number_to_time()
- number_to_datetime()
- number_to_datetime_with_warn()
- Field_temporal_with_date::store_decimal()
- my_decimal2seconds()
- Item::get_seconds()
This commit is contained in:
Alexander Barkov
2018-08-07 16:26:35 +04:00
parent 9da706fac3
commit 385ee993d9
6 changed files with 28 additions and 28 deletions

View File

@ -217,15 +217,15 @@ public:
*/
class Sec6_add
{
longlong m_sec; // number of seconds
long m_usec; // number of microseconds
ulonglong m_sec; // number of seconds
ulong m_usec; // number of microseconds
bool m_neg; // false if positive, true if negative
bool m_error; // false if the value is OK, true otherwise
void to_hh24mmssff(MYSQL_TIME *ltime, timestamp_type tstype) const
{
bzero(ltime, sizeof(*ltime));
ltime->neg= m_neg;
calc_time_from_sec(ltime, (long) (m_sec % SECONDS_IN_24H), m_usec);
calc_time_from_sec(ltime, (ulong) (m_sec % SECONDS_IN_24H), m_usec);
ltime->time_type= tstype;
}
public: