1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-12345 Performance : replace calls to clock() inside trx_start_low() by THD::start_utime

This commit is contained in:
Vladislav Vaintroub
2017-03-23 11:48:56 +00:00
parent 09a2107b1b
commit e5b67a46bc
11 changed files with 65 additions and 4 deletions

View File

@@ -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.