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:
@ -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:
|
||||
|
Reference in New Issue
Block a user