mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
MDEV-15019 - InnoDB: store ReadView on trx
This will allow us to reduce critical section protected by trx_sys.mutex: - no need to maintain global m_free list - eliminate if (trx->read_view == NULL) condition. On x86_64 sizeof(Readview) is 144 mostly due to padding, sizeof(trx_t) with ReadView is 1200. Also don't close ReadView for read-write transactions, just mark it closed similarly to read-only. Clean-up: removed n_prepared_recovered_trx and n_prepared_trx, which accidentally re-appeared after some rebase.
This commit is contained in:
parent
ec32c05072
commit
4dc30f3c17
13 changed files with 196 additions and 321 deletions
|
|
@ -211,17 +211,6 @@ ok:
|
|||
trx->dict_operation = op;
|
||||
}
|
||||
|
||||
/**
|
||||
@param trx Get the active view for this transaction, if one exists
|
||||
@return the transaction's read view or NULL if one not assigned. */
|
||||
UNIV_INLINE
|
||||
ReadView*
|
||||
trx_get_read_view(
|
||||
trx_t* trx)
|
||||
{
|
||||
return(!MVCC::is_view_active(trx->read_view) ? NULL : trx->read_view);
|
||||
}
|
||||
|
||||
/**
|
||||
@param[in] trx Transaction to check
|
||||
@return true if the transaction is a high priority transaction.*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue