
上QQ阅读APP看本书,新人免费读10天
设备和账号都新为新人
2.3.2 源码重要接口
1.主库
· 初始化构造函数:Gtid_log_event::Gtid_log_event(THD* thd_arg,bool using_trans,int64 last_committed_arg,int64 sequence_number_arg,bool may_have_sbr_stmts_arg);
· GTID_EVENT不需要写入binlog cache:从内存直接写入binary log,作为事务的第一个Event。但是其中包含一个写入内存的函数叫作write_to_memory,其中的write_data_header_to_memory函数描述了写入的格式。
2.从库
· 读取构造函数:Gtid_log_event::Gtid_log_event(const char *buffer,uint event_len,const Format_description_event *description_event);
· 应用函数:Gtid_log_event::do_apply_event。