
上QQ阅读APP看本书,新人免费读10天
设备和账号都新为新人
1.1.4 GTID的生成
在发起commit命令后,当order commit执行到FLUSH阶段,需要生成GTID Event时,会获取GTID,3.3节将会详细描述它的生成过程。MySQL内部维护了一个全局的GTID计数器next_free_gno,用于生成gno。可以参考Gtid_state::get_automatic_gno函数,部分代码如下。


在发起commit命令后,当order commit执行到FLUSH阶段,需要生成GTID Event时,会获取GTID,3.3节将会详细描述它的生成过程。MySQL内部维护了一个全局的GTID计数器next_free_gno,用于生成gno。可以参考Gtid_state::get_automatic_gno函数,部分代码如下。