我搜集到了一些资料,对理解代码比较有帮助. 在头文件中binlog_event.h中,有描述 class Log_event_header class Log_event_footer 参见[Mysteries of the Binary Log Presentation.pdf] 代码见[mysql-5.7.6-m16_src.zip] MySQL binlog头4个字节:BINLOG_HEADER = b'\xfe\x62\x69\x6e' 然后我们就可以一个Event,一个Event的读取…
1.mysql有许多系统变量,可以设置,系统变量设置不同,不同的系统将导致执行状态. 故mysql提供两组命令,分别查看系统设置和执行状态. 1.系统设置: SHOW [GLOBAL | SESSION] VARIABLES [like_or_where] SHOW VARIABLES shows the values of MySQL system variables. 2.执行状态: SHOW [GLOBAL | SESSION] STATUS [like_or_where] SHOW ST…