MySQL 8.0.40
Source Code Documentation
|
Read view lists the trx ids of those transactions for which a consistent read should not see the modifications to the database. More...
#include <read0types.h>
Classes | |
class | ids_t |
This is similar to a std::vector but it is not a drop in replacement. More... | |
Public Member Functions | |
ReadView () | |
ReadView constructor. More... | |
~ReadView () | |
ReadView destructor. More... | |
bool | changes_visible (trx_id_t id, const table_name_t &name) const |
Check whether the changes by id are visible. More... | |
bool | sees (trx_id_t id) const |
void | close () |
Mark the view as closed. More... | |
bool | is_closed () const |
void | print_limits (FILE *file) const |
Write the limits to the file. More... | |
void | reduce_low_limit (trx_id_t trx_no) |
Check and reduce low limit number for read view. More... | |
trx_id_t | low_limit_no () const |
trx_id_t | low_limit_id () const |
bool | empty () const |
trx_id_t | view_low_limit_no () const |
bool | le (const ReadView *rhs) const |
Static Public Member Functions | |
static void | check_trx_id_sanity (trx_id_t id, const table_name_t &name) |
Check whether transaction id is valid. More... | |
Private Member Functions | |
void | copy_trx_ids (const trx_ids_t &trx_ids) |
Copy the transaction ids from the source vector. More... | |
void | prepare (trx_id_t id) |
Opens a read view where exactly the transactions serialized before this point in time are seen in the view. More... | |
void | copy_prepare (const ReadView &other) |
Copy state from another view. More... | |
void | copy_complete () |
Complete the copy, insert the creator transaction id into the m_trx_ids too and adjust the m_up_limit_id *, if required. More... | |
void | creator_trx_id (trx_id_t id) |
Set the creator transaction id, existing id must be 0. More... | |
ReadView (const ReadView &) | |
ReadView & | operator= (const ReadView &) |
typedef | UT_LIST_NODE_T (ReadView) node_t |
Private Attributes | |
trx_id_t | m_low_limit_id |
The read should not see any transaction with trx id >= this value. More... | |
trx_id_t | m_up_limit_id |
The read should see all trx ids which are strictly smaller (<) than this value. More... | |
trx_id_t | m_creator_trx_id |
trx id of creating transaction, set to TRX_ID_MAX for free views. More... | |
ids_t | m_ids |
Set of RW transactions that was active when this snapshot was taken. More... | |
trx_id_t | m_low_limit_no |
The view does not need to see the undo logs for transactions whose transaction number is strictly smaller (<) than this value: they can be removed in purge if not needed by other views. More... | |
trx_id_t | m_view_low_limit_no |
The low limit number up to which read views don't need to access undo log records for MVCC. More... | |
bool | m_closed |
AC-NL-RO transaction view that has been "closed". More... | |
byte | pad1 [64 - sizeof(node_t)] |
List of read views in trx_sys. More... | |
node_t | m_view_list |
Friends | |
class | MVCC |
Read view lists the trx ids of those transactions for which a consistent read should not see the modifications to the database.
ReadView::ReadView | ( | ) |
ReadView constructor.
ReadView::~ReadView | ( | ) |
ReadView destructor.
|
private |
|
inline |
Check whether the changes by id are visible.
[in] | id | transaction id to check against the view |
[in] | name | table name |
|
static |
Check whether transaction id is valid.
[in] | id | transaction id to check |
[in] | name | table name |
|
inline |
Mark the view as closed.
|
inlineprivate |
Complete the copy, insert the creator transaction id into the m_trx_ids too and adjust the m_up_limit_id *, if required.
Complete the copy, insert the creator transaction id into the m_ids too and adjust the m_up_limit_id, if required.
|
inlineprivate |
Copy state from another view.
Must call copy_complete() to finish.
other | view to copy from |
|
inlineprivate |
Copy the transaction ids from the source vector.
|
inlineprivate |
Set the creator transaction id, existing id must be 0.
|
inline |
|
inline |
|
inline |
rhs | view to compare with |
|
inline |
|
inline |
|
inlineprivate |
Opens a read view where exactly the transactions serialized before this point in time are seen in the view.
id | Creator transaction id |
|
inline |
Write the limits to the file.
file | file to write to |
|
inline |
Check and reduce low limit number for read view.
Used to block purge till GTID is persisted on disk table.
[in] | trx_no | transaction number to check with |
|
inline |
id | transaction to check |
|
private |
|
inline |
|
friend |
|
private |
AC-NL-RO transaction view that has been "closed".
|
private |
trx id of creating transaction, set to TRX_ID_MAX for free views.
|
private |
Set of RW transactions that was active when this snapshot was taken.
|
private |
The read should not see any transaction with trx id >= this value.
In other words, this is the "high water mark".
|
private |
The view does not need to see the undo logs for transactions whose transaction number is strictly smaller (<) than this value: they can be removed in purge if not needed by other views.
|
private |
The read should see all trx ids which are strictly smaller (<) than this value.
In other words, this is the low water mark".
|
private |
|
private |
The low limit number up to which read views don't need to access undo log records for MVCC.
This could be higher than m_low_limit_no if purge is blocked for GTID persistence. Currently used for debug variable INNODB_PURGE_VIEW_TRX_ID_AGE.
|
private |
List of read views in trx_sys.