Community journal

The latest from the MySQL community

Ideas, releases, practical guides, and perspectives from the people building with MySQL.

Follow the feed
Showing entries 1 to 1 of 1 « Previous | Next »
Displaying posts with tag: Atomic DDL (reset)
Atomic DDL 揭秘

在 MySQL-8.0 之前,DDL 是不能做到 Crash Safe 的。主要的问题有 3 个:

  1. Server 层的 Metadata 和 InnoDB 的 Metadata/数据不一致。

    Server 层的 Metadata 记录在文件中,例如表结构信息保存在 frm 文件中;InnoDB 中也有一份 Metadata 存储在表中。Crash 可能导致 Server 层的 Metadata 和 InnoDB 中的 Metadata、甚至表中的数据不一致。比如 Server 层存在表的 frm 文件,认为表存在,但是 InnoDB 的 ibd 数据文件已经不存在了,InnoDB 认为表不存在。

  2. InnoDB 的 Metadata 和数据不一致。
  3. Binlog 和数据不一致。

    比如 Crash 重启后,表已经存在了,但是 CREATE TABLE 却没有记录到 Binlog 中。

MySQL-8.0 为了实现 Atomic …

[获取更多]