From bdb12d149992910e54051c8eb800ff2610712987 Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Mon, 26 Sep 2016 08:37:53 +0000 Subject: IB: 0.2 part II * moved vers_notify_vtq() to commit phase; * low_level insert (load test passed); * rest of SYS_VTQ columns filled: COMMIT_TS, CONCURR_TRX; * savepoints support; * I_S.INNODB_SYS_VTQ adjustments: - limit to I_S_SYS_VTQ_LIMIT(10000) of most recent records; - CONCURR_TRX limit to I_S_MAX_CONCURR_TRX(100) with '...' truncation marker; - TIMESTAMP fields show fractions of seconds. --- sql/sql_time.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sql/sql_time.h') diff --git a/sql/sql_time.h b/sql/sql_time.h index e0cab5cfa66..fd0c0273dcf 100644 --- a/sql/sql_time.h +++ b/sql/sql_time.h @@ -171,6 +171,16 @@ bool calc_time_diff(const MYSQL_TIME *l_time1, const MYSQL_TIME *l_time2, int lsign, MYSQL_TIME *l_time3, ulonglong fuzzydate); int my_time_compare(const MYSQL_TIME *a, const MYSQL_TIME *b); void localtime_to_TIME(MYSQL_TIME *to, struct tm *from); +void unix_time_to_TIME(MYSQL_TIME *to, time_t secs, suseconds_t usecs); + +inline +longlong unix_time_to_packed(time_t secs, suseconds_t usecs) +{ + MYSQL_TIME mysql_time; + unix_time_to_TIME(&mysql_time, secs, usecs); + return pack_time(&mysql_time); +} + void calc_time_from_sec(MYSQL_TIME *to, long seconds, long microseconds); uint calc_week(MYSQL_TIME *l_time, uint week_behaviour, uint *year); -- cgit v1.2.1