diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-03-23 11:48:56 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-03-23 11:50:22 +0000 |
commit | e5b67a46bcb75a751f5906f19694971bc803d67c (patch) | |
tree | eedc485ef1f5dec061c315b6ffe54a76e496f003 /sql | |
parent | 09a2107b1b2f5567b8a50afec9e54a33284c6233 (diff) | |
download | mariadb-git-e5b67a46bcb75a751f5906f19694971bc803d67c.tar.gz |
MDEV-12345 Performance : replace calls to clock() inside trx_start_low() by THD::start_utime
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_class.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 3a7e501c6c2..5dba389115a 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -4534,6 +4534,15 @@ extern "C" int thd_rpl_is_parallel(const MYSQL_THD thd) return thd->rgi_slave && thd->rgi_slave->is_parallel_exec; } + +/* Returns high resolution timestamp for the start + of the current query. */ +extern "C" unsigned long long thd_start_utime(const MYSQL_THD thd) +{ + return thd->start_utime; +} + + /* This function can optionally be called to check if thd_report_wait_for() needs to be called for waits done by a given transaction. |