mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Always initialize trx_t::start_time_micro
This affects the function has_higher_priority() for internal or recovered transactions.
This commit is contained in:
parent
10ee1b95b8
commit
10727b6953
8 changed files with 30 additions and 26 deletions
|
|
@ -570,7 +570,8 @@ trx_resurrect_insert(
|
|||
/* trx_start_low() is not called with resurrect, so need to initialize
|
||||
start time here.*/
|
||||
if (trx->state != TRX_STATE_COMMITTED_IN_MEMORY) {
|
||||
trx->start_time = ut_time();
|
||||
trx->start_time = time(NULL);
|
||||
trx->start_time_micro = microsecond_interval_timer();
|
||||
}
|
||||
|
||||
if (undo->dict_operation) {
|
||||
|
|
@ -656,7 +657,8 @@ trx_resurrect_update(
|
|||
start time here.*/
|
||||
if (trx->state == TRX_STATE_ACTIVE
|
||||
|| trx->state == TRX_STATE_PREPARED) {
|
||||
trx->start_time = ut_time();
|
||||
trx->start_time = time(NULL);
|
||||
trx->start_time_micro = microsecond_interval_timer();
|
||||
}
|
||||
|
||||
if (undo->dict_operation) {
|
||||
|
|
@ -907,8 +909,9 @@ trx_start_low(
|
|||
|
||||
trx->start_time = ut_time();
|
||||
|
||||
trx->start_time_micro =
|
||||
trx->mysql_thd ? thd_query_start_micro(trx->mysql_thd) : 0;
|
||||
trx->start_time_micro = trx->mysql_thd
|
||||
? thd_query_start_micro(trx->mysql_thd)
|
||||
: microsecond_interval_timer();
|
||||
|
||||
MONITOR_INC(MONITOR_TRX_ACTIVE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue