当前位置:Gxlcms > 数据库问题 > MySQL 一致性读 深入研究 digdeep博客学习

MySQL 一致性读 深入研究 digdeep博客学习

时间:2021-07-01 10:21:17 帮助过:21人阅读

  • Consistent read does not work over ALTER TABLE, because that statement makes a temporary copy of the original table and deletes the original table when the temporary copy is built. When you reissue a consistent read within a transaction, rows in the new table are not visible because those rows did not exist when the transaction‘s snapshot was taken. In this case, the transaction returns an error as of MySQL 5.6.6: ER_TABLE_DEF_CHANGED, “Table definition has changed, please retry transaction”.

  • 原因:ALTER TABLE, DROP TABLE, RENAME TABLE, TRUNCATE TABLE 这些DDL语句的执行,会导致无法使用undo构造出正确的一致性读,一致性读和它们是无法隔离的。

     

    MySQL 一致性读 深入研究 digdeep博客学习

    标签:

    人气教程排行