源码
{ ; ; ; ; ; ; ; ; () ; };
前置知识
每开启一个事务,数据库会自动为之分配一个tx_id,它是线性增长的,也就是越后开启的事务,tx_id越大。
trx_ids
Additional trx ids which the read should not see: typically, these are the read-write active transactions at the time when the read is serialized, except the reading transaction itself; the trx ids in this array are in a descending order. These trx_ids should be between the "low" and "high" water marks, that is, up_limit_id and low_limit_id.
创建该read view 时活跃的事务id数组,不包含创建该read view的事务id(except the reading transaction itself)。
low_limit_id
The smallest number not yet assigned as a transaction id or transaction number
活跃id的最大值+1。虽然是low,但数值确实最大的, 其实就是max_trx_id
up_limit_id
活跃事务id的最小值,最早创建的事务的id,其实就是min_trx_id。
creator_trx_id
创建该read view的事务id