174 return !std::binary_search(
p,
p +
m_ids.
size(),
id);
188 "Trx read view will not see trx with"
The MVCC read view manager.
Definition: read0read.h:46
This is similar to a std::vector but it is not a drop in replacement.
Definition: read0types.h:52
ulint m_size
Number of active elements in the array.
Definition: read0types.h:144
const trx_id_t * data() const
Definition: read0types.h:124
value_type * m_ptr
Memory for the array.
Definition: read0types.h:141
trx_ids_t::value_type value_type
Definition: read0types.h:53
void push_back(value_type value)
Append a value to the array.
Definition: read0read.cc:260
ids_t & operator=(const ids_t &)
value_type front() const
Definition: read0types.h:99
~ids_t()
Destructor.
Definition: read0types.h:61
ulint size() const
Definition: read0types.h:128
ids_t()
Constructor.
Definition: read0types.h:57
void insert(value_type value)
Insert the value in the correct slot, preserving the order.
Definition: read0read.cc:273
void reserve(ulint n)
Try and increase the size of the array.
Definition: read0read.cc:212
bool empty() const
Definition: read0types.h:132
value_type back() const
Definition: read0types.h:107
void clear()
Reset the size to 0.
Definition: read0types.h:79
trx_id_t * data()
Definition: read0types.h:120
ulint m_reserved
Size of m_ptr in elements.
Definition: read0types.h:147
void resize(ulint n)
Resize the array, sets the current element count.
Definition: read0types.h:71
void assign(const value_type *start, const value_type *end)
Copy and overwrite this array contents.
Definition: read0read.cc:238
ulint capacity() const
Definition: read0types.h:83
Read view lists the trx ids of those transactions for which a consistent read should not see the modi...
Definition: read0types.h:49
void copy_prepare(const ReadView &other)
Copy state from another view.
Definition: read0read.cc:629
ReadView()
ReadView constructor.
Definition: read0read.cc:305
std::atomic_bool m_closed
False iff this view is in use by a transaction at the moment (is open).
Definition: read0types.h:274
~ReadView() override
ReadView destructor.
Definition: read0read.cc:316
bool le(const ReadView *rhs) const
Definition: read0types.h:205
node_t m_view_list
Definition: read0types.h:280
void copy_complete()
Complete the copy, insert the creator transaction id into the m_trx_ids too and adjust the m_up_limit...
Definition: read0read.cc:653
void creator_trx_id(trx_id_t id)
Set the creator transaction id, existing id must be 0.
Definition: read0types.h:232
trx_id_t m_low_limit_id
The read should not see any transaction with trx id >= this value.
Definition: read0types.h:247
byte pad1[ut::INNODB_CACHE_LINE_SIZE]
List of read views in trx_sys.
Definition: read0types.h:279
bool is_closed() const
Definition: read0types.h:184
void print(FILE *file) const override
Describe the read-view.
Definition: read0types.h:186
typedef UT_LIST_NODE_T(ReadView) node_t
trx_id_t m_up_limit_id
The read should see all trx ids which are strictly smaller (<) than this value.
Definition: read0types.h:252
ids_t m_ids
Set of RW transactions that was active when this snapshot was taken.
Definition: read0types.h:266
trx_id_t m_creator_trx_id
If the view is open, then this is a trx->id of the transaction which has created this view,...
Definition: read0types.h:262
bool sees_all_trxs_with_id_smaller_or_equal_to(trx_id_t id) const override
Checks if changes made by each trx with trx->id smaller or equal to id, should be visible to this rea...
Definition: read0types.h:177
void copy_trx_ids(const trx_ids_t &trx_ids)
Copy the transaction ids from the source vector.
Definition: read0read.cc:348
void prepare(trx_id_t id)
Opens a read view where exactly the transactions serialized before this point in time are seen in the...
Definition: read0read.cc:441
ReadView & operator=(const ReadView &)
bool empty() const
Definition: read0types.h:199
trx_id_t m_low_limit_no
The view does not need to see the undo logs for transactions whose transaction number is strictly sma...
Definition: read0types.h:271
ReadView(const ReadView &)
trx_id_t get_lowest_needed_trx_no() const override
This read view does not need Undo Logs generated by transactions with trx->no strictly smaller than t...
Definition: read0types.h:193
bool changes_visible(trx_id_t id) const override
Check whether the changes by id are visible.
Definition: read0types.h:159
Definition: read0read_view_interface.h:33
const char * p
Definition: ctype-mb.cc:1227
Data dictionary memory object creation.
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:180
uint16_t value_type
Definition: vt100.h:184
const std::string FILE("FILE")
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
constexpr size_t INNODB_CACHE_LINE_SIZE
CPU cache line size.
Definition: ut0cpu_cache.h:41
void delete_arr(T *ptr) noexcept
Releases storage which has been dynamically allocated through any of the ut::new_arr*() variants.
Definition: ut0new.h:951
Transaction system global type definitions.
#define TRX_ID_FMT
printf(3) format used for printing DB_TRX_ID and other system fields
Definition: trx0types.h:49
std::vector< trx_id_t, ut::allocator< trx_id_t > > trx_ids_t
Definition: trx0types.h:633
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:138
unsigned long int ulint
Definition: univ.i:403
Utilities related to CPU cache.
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:109
unsigned long id[MAX_DEAD]
Definition: xcom_base.cc:510
int n
Definition: xcom_base.cc:509