Skip to content

Commit

Permalink
vault backup: 2023-03-10 10:32:43
Browse files Browse the repository at this point in the history
Affected files:
README.md
inbox/Page Cache.md
inbox/redo log 和 binlog 的两阶段提交.md
notes/programming/InnoDB 如何实现事务 4 特性.md
notes/programming/MOC MySQL.md
notes/programming/binlog.md
notes/programming/redo log VS undo log.md
notes/programming/redo log.md
notes/programming/undo log.md
  • Loading branch information
615lyw committed Mar 10, 2023
1 parent 5047f7d commit 50c5f0d
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ date modified: 2022-09-13, 23:19:02
- [事务](notes/programming/事务.md)
- [synchronized](notes/programming/synchronized.md)
- [Git](notes/programming/Git.md)
- [redolog](notes/programming/redolog.md)
- [redo log](redo%20log.md)
- [Unicode](notes/programming/Unicode.md)
-

Expand Down
Empty file added inbox/Page Cache.md
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion notes/programming/InnoDB 如何实现事务 4 特性.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ date modified: 2022-06-27, 09:04:10
- 脏写是通过加锁避免的
- 脏读和不可重复读,分别通过 `READ COMMITTED``REPEATABLE READ` 隔离级别解决,这两个隔离级别通过 [[MVCC]] 实现
- MySQL 通过 [[MySQL 锁#间隙锁]]`REPEATABLE READ` 隔离级别下解决了幻读问题
- 持久性是通过 [[redolog]] 保证
- 持久性是通过 [[redo log]] 保证
2 changes: 1 addition & 1 deletion notes/programming/MOC MySQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ date modified: 2022-06-14, 14:54:18
- [[InnoDB 存储引擎]]
- [[MyISAM 索引原理]]
- 日志
- [[redolog]]
- [[redo log]]
- [[undo log]]
- [[binlog]]
- [[Buffer Pool]]
Expand Down
11 changes: 6 additions & 5 deletions notes/programming/binlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ date modified: 2022-07-27, 11:16:27

- alias:
- parent :: [[MOC MySQL]]
- siblings :: [[redolog]][[undo log]]
- siblings :: [[redo log]][[undo log]]
- child ::
- refs: [MySQL 日志:undo log、redo log、binlog 有什么用? | 小林coding](https://xiaolincoding.com/mysql/log/how_update.html#%E4%B8%BA%E4%BB%80%E4%B9%88%E9%9C%80%E8%A6%81-binlog)

Expand All @@ -16,18 +16,19 @@ date modified: 2022-07-27, 11:16:27
binlog 是 binary log 的缩写,即二进制日志。特点:

- Server 层日志,所有存储引擎都可以使用
- 记录了所有数据库表结构变更和表数据修改的日志,不会记录查询类的操作
- 记录了所有数据库表结构变更和表数据修改的日志,**不会记录查询类的操作**
- binlog 是追加写,写满一个文件,就创建一个新的文件继续写,不会覆盖以前的日志,保存的是全量的日志

# 用途

- [[MySQL 主从复制]]
- 备份

# 三种格式

- 恢复

# binlog 什么时候刷盘?

事务执行过程中产生的 binlog 写入 Server 层的 binlog cache 中,事务提交时再从 binlog cache 中写入 binlog 文件中。

# 两阶段提交

[[redo log 和 binlog 的两阶段提交]]
2 changes: 1 addition & 1 deletion notes/programming/redo log VS undo log.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ date modified: 2022-07-27, 10:28:07
# Meta

- alias:
- parent :: [[redolog]][[undo log]]
- parent :: [[redo log]][[undo log]]
- siblings ::
- child ::
- refs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ date modified: 2022-07-28, 23:31:25

- alias:
- parent :: [[MOC MySQL]]
- siblings :: [[undo log]]
- siblings :: [[undo log]][[binlog]]
- child ::
- refs:
- [MySQL 日志:undo log、redo log、binlog 有什么用? | 小林coding](https://xiaolincoding.com/mysql/log/how_update.html#%E4%B8%BA%E4%BB%80%E4%B9%88%E9%9C%80%E8%A6%81-redo-log)
Expand Down Expand Up @@ -85,3 +85,4 @@ InnoDB 的后台线程每隔 1 秒:

# 两阶段提交

[[redo log 和 binlog 的两阶段提交]]
2 changes: 1 addition & 1 deletion notes/programming/undo log.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ date modified: 2022-07-27, 10:28:13

- alias: **撤销日志**,回滚日志
- parent :: [[MOC MySQL]]
- siblings :: [[redolog]][[binlog]]
- siblings :: [[redo log]][[binlog]]
- child :: [[redo log VS undo log]]
- refs:
- [MySQL 是怎样运行的:从根儿上理解 MySQL - 小孩子4919 - 掘金课程](https://juejin.cn/book/6844733769996304392/section/6844733770067607566)
Expand Down

0 comments on commit 50c5f0d

Please sign in to comment.