InnoDB---UNDO日志与回滚
来源:互联网 发布:长春干部网络学校 编辑:程序博客网 时间:2024/06/18 14:30
事务通过trx_rsegs_t与系统表空间和临时表空间等物理存储联系起来的方式如下:
/** Rollback segments assigned to a transaction forundo logging. */
struct trx_rsegs_t{
/** undolog ptr holding reference to a rollback segment that resides in
system/undotablespace used for undo logging of tables that needs to be recovered oncrash. */
trx_undo_ptr_t m_redo; //系统的UNDO表空间
/** undolog ptr holding reference to a rollback segment that resides in
temptablespace used for undo logging of tables that doesn't need to berecovered on crash. */
trx_undo_ptr_t m_noredo; //系统的临时表空间
};
系统表空间和临时表空间等物理存储与UNDO日志之间的关系如下:
/** Represents an instance of rollback segmentalong with its state variables.*/
struct trx_undo_ptr_t{
//标识分配给事务的回滚段,这样把事务和回滚段建立起联系来。然后通过trx_rsegs_t与系统表空间和临时表空间等物理存储联系起来
trx_rseg_t* rseg; //指向回滚段
trx_undo_t* insert_undo; /*!< pointer to the insert undo log, or NULL if no inserts performed yet */ //事务指向insert undo log
trx_undo_t* update_undo; /*!< pointer to the update undo log, or ULL if no update performed yet */ //事务指向update undo log
};
而回滚段的信息又如下:
/** The rollback segment memory object */
struct trx_rseg_t{
ulint id; //回滚段的标识
...
ulint space; //回滚段的头信息在表空间中的位置,表空间标识
ulint page_no; //回滚段的头信息在表空间中的位置,页号
page_size_t page_size; /** pagesize of the relevant tablespace */
ulint max_size; /** maximum allowed size inpages */
ulint curr_size; /**current size in pages */
...
/** 执行UPDATE操作产生的UODO日志,包括先删除后插入的过程中产生的UODO信息,事务完成,信息依然被保留,用于MVCC机制下的一致性读 */
/** Listof update undo logs */
UT_LIST_BASE_NODE_T(trx_undo_t) update_undo_list;
/** Listof update undo log segments cached for fast reuse */
UT_LIST_BASE_NODE_T(trx_undo_t) update_undo_cached;
/* 执行INSERT操作产生的UODO日志,这些信息是临时的,事务结束后就被清理 */
/** Listof insert undo logs */
UT_LIST_BASE_NODE_T(trx_undo_t) insert_undo_list;
/** Listof insert undo log segments cached for fast reuse */
UT_LIST_BASE_NODE_T(trx_undo_t) insert_undo_cached;
...
};
- InnoDB---UNDO日志与回滚
- undo空间管理(可以收缩undo log回滚日志物理文件空间)
- undo空间管理(可以收缩undo log回滚日志物理文件空间)
- 日志回滚与处理
- MySQL5.7 可以回收(收缩)undo log回滚日志物理文件空间
- MySQL5.7 可以回收(收缩)undo log回滚日志物理文件空间
- Mysql innodb undo与redo (2)
- Oracle 回滚(ROLLBACK)和撤销(UNDO)
- Oracle 内存回滚 (In Memory Undo)
- Oracle 回滚(ROLLBACK)和撤销(UNDO)
- Oracle 回滚(ROLLBACK)和撤销(UNDO)
- Oracle 回滚(ROLLBACK)和撤销(UNDO)
- Oracle 回滚(ROLLBACK)和撤销(UNDO)
- Oracle 回滚(ROLLBACK)和撤销(UNDO)
- Oracle 回滚(ROLLBACK)和撤销(UNDO)
- MySQL当中的日志 --- 浅析InnoDB undo log(1)
- InnoDB事务日志(redo log 和 undo log)详解
- InnoDB事务日志(redo log 和 undo log)
- Greenplum Orca 优化器目录结构
- Orca优化器--基本结构和基本对象
- 配置JDK环境变量,工欲善其事,必先利其器
- 长事务的管理
- InnoDB---事务和并发控制相关的文件
- InnoDB---UNDO日志与回滚
- fork实现
- InnoDB---深入理解事务提交--01
- InnoDB---深入理解事务提交--02
- Linux开发疑问apt-get upate 出现无法连接的问题
- java日期
- Integer和int的区别
- 数组那些不为菜鸟所知的秘密(零)
- InnoDB---深入理解事务提交--03