`

作者:刘开洋
爱可生交付服务团队北京 DBA,对数据库及周边技术有浓厚的学习兴趣,喜欢看书,追求技术。
本文来源:原创投稿
*爱可生开源社区出品,原创内容未经授权不得随意使用,转载请联系小编并注明来源。

问题

同事在客户那里解决问题时发现一个报错,出于兴趣就进行了研究:

Statement violates GTID consistency: Updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions,and never in the same statement as updates to transactional tables.

报错的意思是指业务端下发的事务违反了 GTID 的一致性。

原因是,非事务表和事务表在一条事务里进行了更新,MySQL 是不允许我们这么做的,但业务非要胳膊掰大腿,怎么办?

官方说明:

Only statements that can be logged using GTID safe statements can be logged when enforce_gtid_consistency is set to ON,so the operations listed here cannot be used with this option:

  • Transactions or statements that update both transactional and nontransactional tables.

跟客户沟通确定了该报错事务涉及到的两张表分别是 innodb 表和 myisam 表。我们在自己环境上复现一下。

    <h2 data-tool="mdnice编辑器" style="margin-top: 5px; padding: 0px; font-weight: bold; font-size: 22px; max-width: 100%; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; overflow-wrap: break-word !important;">复现</h2>使用 mysql 5.7.25,开启 gtid,<br></p>     
                                    <img width="750" height="355" src="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-01.png" alt="" srcset="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-01.png 881w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-01-300x142.png 300w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-01-768x364.png 768w" sizes="(max-width: 750px) 100vw, 750px" />                                         
    <p>并分别创建一张 innodb 表和 myisam 表。<br></p>      
                                    <img width="708" height="382" src="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-02.png" alt="" srcset="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-02.png 708w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-02-300x162.png 300w" sizes="(max-width: 708px) 100vw, 708px" />                                         
    <p>在同一个事务中对两张表进行更新:<br></p>     
                                    <img width="520" height="317" src="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-03.png" alt="" srcset="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-03.png 520w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-03-300x183.png 300w" sizes="(max-width: 520px) 100vw, 520px" />                                         
    <p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;">没有报错呀,怎么和客户那里的报错解释不符?</p><p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;">我们将两张表的提交顺序换一下呢?</p>       
                                    <img width="750" height="171" src="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-04-1024x233.png" alt="" srcset="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-04-1024x233.png 1024w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-04-300x68.png 300w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-04-768x175.png 768w" sizes="(max-width: 750px) 100vw, 750px" />                                           
    <p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;">果然复现了客户环境中的报错。可是为什么先更新 myisam 引擎表,可以更新 innodb 引擎表,反之则不行呢?</p><p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;">因为 myisam 引擎表不支持事务,在我们下发 begin 之后,就已经隐式提交了,这是个运维经验,无法直接判断,专门请教了行业大牛得到的确认;而继续更新 myisam 表时,MySQL 不认这个 insert myisam 表的操作是一个事务操作,只是给予一个记录 binlog 位置的 gtid,之后再更新 innodb 表的操作时,mysql 就认定这是在更新一条事务,在 commit 中就将这条事务提交了。</p>      
    <h2 data-tool="mdnice编辑器" style="margin-top: 5px; padding: 0px; font-weight: bold; font-size: 22px; max-width: 100%; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; overflow-wrap: break-word !important;">解决</h2><p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;">解决办法有三种:</p><ol data-tool="mdnice编辑器" style="margin: 8px 0px; padding: 0px 0px 0px 25px; max-width: 100%; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; overflow-wrap: break-word !important;"><li style="margin: 0px; padding: 0px; max-width: 100%; font-size: 14px; overflow-wrap: break-word !important;"><section style="margin: 5px 0px; padding: 0px; max-width: 100%; line-height: 26px; color: rgb(1, 1, 1); overflow-wrap: break-word !important;"><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; line-height: 26px; color: black; overflow-wrap: break-word !important;">在业务层面修改事务逻辑,将对 myisam 表和 innodb 表的更新语句拆分到不同事务中。</p></section></li><li style="margin: 0px; padding: 0px; max-width: 100%; font-size: 14px; overflow-wrap: break-word !important;"><section style="margin: 5px 0px; padding: 0px; max-width: 100%; line-height: 26px; color: rgb(1, 1, 1); overflow-wrap: break-word !important;"><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; line-height: 26px; color: black; overflow-wrap: break-word !important;">将 myisam 存储引擎改为 innodb 存储引擎。</p></section></li><li style="margin: 0px; padding: 0px; max-width: 100%; font-size: 14px; overflow-wrap: break-word !important;"><section style="margin: 5px 0px; padding: 0px; max-width: 100%; line-height: 26px; color: rgb(1, 1, 1); overflow-wrap: break-word !important;"><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; line-height: 26px; color: black; overflow-wrap: break-word !important;">关闭事务一致性参数 ENFORCE_GTID_CONSISTENCY。</p></section></li></ol><p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;"><strong style="margin: 0px; padding: 0px; max-width: 100%; overflow-wrap: break-word !important;">接下来分别对三种解决方案进行验证:</strong></p><p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;">1)修改业务逻辑,将 myisam 表的更新语句单独放在一个事务里执行。</p>        
                                    <img width="503" height="194" src="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-05.png" alt="" srcset="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-05.png 503w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-05-300x116.png 300w" sizes="(max-width: 503px) 100vw, 503px" />                                         
    <p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;">这是最为稳妥的一个方法。</p><p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;">2)修改 myisam 表的存储引擎为 innodb</p><ol data-tool="mdnice编辑器" style="margin: 8px 0px; padding: 0px 0px 0px 25px; max-width: 100%; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; overflow-wrap: break-word !important;"><li style="margin: 0px; padding: 0px; max-width: 100%; font-size: 14px; overflow-wrap: break-word !important;"><section style="margin: 5px 0px; padding: 0px; max-width: 100%; line-height: 26px; color: rgb(1, 1, 1); overflow-wrap: break-word !important;"><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; line-height: 26px; color: black; overflow-wrap: break-word !important;">首先确认如果数据量比较大,可以使用 mysqldump 导出数据,然后修改 SQL 文件中的存储引擎的类型和表名,删掉 drop table 的操作,之后保存 SQL 文件导入到数据库中。</p></section></li><li style="margin: 0px; padding: 0px; max-width: 100%; font-size: 14px; overflow-wrap: break-word !important;"><section style="margin: 5px 0px; padding: 0px; max-width: 100%; line-height: 26px; color: rgb(1, 1, 1); overflow-wrap: break-word !important;"><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; line-height: 26px; color: black; overflow-wrap: break-word !important;">percona 公司也有一款工具适用于这样的场景,有兴趣的同学可以研究使用下,以备生产环境的使用:pt-online-schema-change。</p></section></li><li style="margin: 0px; padding: 0px; max-width: 100%; font-size: 14px; overflow-wrap: break-word !important;"><section style="margin: 5px 0px; padding: 0px; max-width: 100%; line-height: 26px; color: rgb(1, 1, 1); overflow-wrap: break-word !important;"><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; line-height: 26px; color: black; overflow-wrap: break-word !important;">如果表数据量很小,就可以使用常规的 alter 语句直接修改:alert table sanguo engine = InnoDB。</p></section></li></ol>      
                                    <img width="710" height="468" src="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-06.png" alt="" srcset="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-06.png 710w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-06-300x198.png 300w" sizes="(max-width: 710px) 100vw, 710px" />                                         
                                    <img width="586" height="282" src="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-07.png" alt="" srcset="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-07.png 586w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-07-300x144.png 300w" sizes="(max-width: 586px) 100vw, 586px" />                                         
    <figure data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; padding: 0px; max-width: 100%; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; display: flex; flex-direction: column; justify-content: center; align-items: center; overflow-wrap: break-word !important;"><br></figure><blockquote data-tool="mdnice编辑器" style="margin-top: 20px; padding-top: 20px; padding-bottom: 20px; border-width: initial; border-style: none; border-color: initial; color: rgba(0, 0, 0, 0.5); font-size: 15px; max-width: 100%; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; box-shadow: rgba(0, 0, 0, 0.2) 1px 1px 10px; overflow-wrap: break-word !important;"><blockquote style="margin-top: 1em; margin-bottom: 1em; padding: 4px 0px 0px 10px; border-width: initial; border-style: none; border-color: initial; font-size: 15px; max-width: 100%; overflow-wrap: break-word !important;"><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; font-size: 16px; line-height: 26px; color: black; overflow-wrap: break-word !important;"><strong style="margin: 0px; padding: 0px; max-width: 100%; overflow-wrap: break-word !important;">注意:</strong></p><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; font-size: 16px; line-height: 26px; color: black; overflow-wrap: break-word !important;">myisam 存储引擎表不支持事务,innodb 表相对于 myisam 表来说能支持更多的数据库高级操作,例如:事务、外键。随着 MySQL 版本的不断更新迭代,innodb 的优势越来越大,建议将所有 MySQL 表的存储引擎逐渐替换为 innodb,两种存储引擎其他方面的优劣对比参考网上文档。</p></blockquote></blockquote><p>3)关闭事务一致性参数 ENFORCE_GTID_CONSISTENCY<br></p>      
                                    <img width="750" height="234" src="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-08-1024x319.png" alt="" srcset="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-08-1024x319.png 1024w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-08-300x93.png 300w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-08-768x239.png 768w" sizes="(max-width: 750px) 100vw, 750px" />                                           
    <p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;">OFF_PERMISSIVE: New transactions are anonymous. Replicated transactions can be either anonymous or GTID transactions.</p><ul data-tool="mdnice编辑器" style="margin: 8px 0px; padding: 0px 0px 0px 25px; max-width: 100%; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; overflow-wrap: break-word !important;"><li style="margin: 0px; padding: 0px; max-width: 100%; font-size: 14px; overflow-wrap: break-word !important;"><section style="margin: 5px 0px; padding: 0px; max-width: 100%; line-height: 26px; color: rgb(1, 1, 1); overflow-wrap: break-word !important;"><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; line-height: 26px; color: black; overflow-wrap: break-word !important;">匿名事务依赖于二进制日志文件和位置来识别特定的事务。</p></section></li><li style="margin: 0px; padding: 0px; max-width: 100%; font-size: 14px; overflow-wrap: break-word !important;"><section style="margin: 5px 0px; padding: 0px; max-width: 100%; line-height: 26px; color: rgb(1, 1, 1); overflow-wrap: break-word !important;"><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; line-height: 26px; color: black; overflow-wrap: break-word !important;">从 MySQL 5.7.6 开始,添加的 OFF_PERMISSIVE 和 ON_PERMISSIVE 模式允许在拓扑中混合使用这些事务类型。</p></section></li></ul>       
                                    <img width="528" height="502" src="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-09.png" alt="" srcset="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-09.png 528w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-09-300x285.png 300w" sizes="(max-width: 528px) 100vw, 528px" />                                         
    <p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;">对表的更新操作完成。</p><p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;">我们去看看此时 binlog 中的写入:</p>      
                                    <img width="750" height="324" src="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-10-1024x442.png" alt="" srcset="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-10-1024x442.png 1024w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-10-300x129.png 300w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-10-768x331.png 768w" sizes="(max-width: 750px) 100vw, 750px" />                                          
                                    <img width="750" height="234" src="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-11-1024x319.png" alt="" srcset="https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-11-1024x319.png 1024w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-11-300x93.png 300w, https://opensource.actionsky.com/wp-content/uploads/2021/04/210429-lky-11-768x239.png 768w" sizes="(max-width: 750px) 100vw, 750px" />                                           
    <p data-tool="mdnice编辑器" style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; line-height: 26px; overflow-wrap: break-word !important;">关闭 ENFORCE_GTID_CONSISTENCY 参数后新事务的提交都是匿名的,且提交顺序被打乱,数据库不再进行一致性检查;但此时复制会中断,数据库使用的 HA 将失效。权衡利弊,对于业务来说代价较高,不建议使用。</p><blockquote data-tool="mdnice编辑器" style="margin-top: 20px; padding-top: 20px; padding-bottom: 20px; border-width: initial; border-style: none; border-color: initial; color: rgba(0, 0, 0, 0.5); font-size: 15px; max-width: 100%; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; box-shadow: rgba(0, 0, 0, 0.2) 1px 1px 10px; overflow-wrap: break-word !important;"><blockquote style="margin-top: 1em; margin-bottom: 1em; padding: 4px 0px 0px 10px; border-width: initial; border-style: none; border-color: initial; font-size: 15px; max-width: 100%; overflow-wrap: break-word !important;"><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; font-size: 16px; line-height: 26px; color: black; overflow-wrap: break-word !important;"><strong style="margin: 0px; padding: 0px; max-width: 100%; overflow-wrap: break-word !important;">附:</strong></p><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; font-size: 16px; line-height: 26px; color: black; overflow-wrap: break-word !important;">如果在一个生产环境中,不建议同时更新 innodb 和 myisam 存储引擎表,对于 myisam 引擎表的更改是无法进行回滚的,建议业务将 SQL 上线前一定做好检查。</p></blockquote></blockquote>     
    <h4 data-tool="mdnice编辑器" style="margin-top: 5px; padding: 0px; font-weight: bold; font-size: 18px; max-width: 100%; color: rgb(0, 0, 0); font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; overflow-wrap: break-word !important;">参考</h4><blockquote data-tool="mdnice编辑器" style="margin-top: 20px; padding-right: 10px; border-left-width: 3px; border-left-color: rgba(0, 0, 0, 0.4); color: rgb(106, 115, 125); font-size: 0.9em; max-width: 100%; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; border-top: none; border-right: none; border-bottom: none; overflow: auto; background: rgba(0, 0, 0, 0.05); overflow-wrap: break-word !important;"><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; font-size: 16px; color: black; line-height: 26px; overflow-wrap: break-word !important;">https://dev.mysql.com/doc/refman/5.7/en/replication-options-gtids.html</p><p style="margin-bottom: 0px; padding: 8px 0px; max-width: 100%; clear: both; min-height: 1em; font-size: 16px; color: black; line-height: 26px; overflow-wrap: break-word !important;">https://www.percona.com/doc/percona-toolkit/LATEST/pt-online-schema-change.html</p></blockquote>        
    <p style="margin-top: 25px; margin-bottom: 0px; padding: 8px 10px; max-width: 100%; overflow-wrap: break-word; clear: both; min-height: 1em; color: black; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 16px; letter-spacing: 0px; word-break: break-word; line-height: normal;"><strong style="margin: 0px; padding: 0px; max-width: 100%; overflow-wrap: break-word !important;">文章推荐:</strong><br style="margin: 0px; padding: 0px; max-width: 100%; overflow-wrap: break-word !important;"></p>

故障分析 | 奇怪!内存明明够用,MySQL 却出现了 OOM

故障分析 | 如何提高 MHA 的网络容忍能力?(下)

<

p style=”margin-bottom: 0px; padding: 8px 10px; max-width: 100%; overflow-wrap: break-word; clear: both; min-height: 1em; color: black; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, “PingFang SC”, Cambria, Cochin, Georgia, Times, “Times New Roman”, serif; font-size: 16px; letter-spacing: 0px; word-break: break-word; line-height: normal;”>故障分析 | 如何提高 MHA 的网络容忍能力?(上)