summaryrefslogtreecommitdiff
path: root/sql/sql_time.h
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2016-09-26 08:37:53 +0000
committerAleksey Midenkov <midenok@gmail.com>2017-05-05 20:36:08 +0300
commitbdb12d149992910e54051c8eb800ff2610712987 (patch)
tree064afe90e5a5fa70cd9425c38c6e65e4fc6aeb6d /sql/sql_time.h
parent002a1bd0769fc85f1e4e4670b9cc3b907ab2e11b (diff)
downloadmariadb-git-bdb12d149992910e54051c8eb800ff2610712987.tar.gz
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.
Diffstat (limited to 'sql/sql_time.h')
-rw-r--r--sql/sql_time.h10
1 files changed, 10 insertions, 0 deletions
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);