简体   繁体   English

Mariadb binlog查询事件q_flag

[英]Mariadb binlog query event q_flag

I have a program which can read MySQL binlog.我有一个程序可以读取 MySQL 二进制日志。 Recently I use the program to parse a binlog generated by MariaDb 10.3.最近用程序解析了一个MariaDb 10.3生成的binlog。 I found that there are Q_FLAGS in the QUERY_EVENT which was not specified in the MySQL binlog specification.我发现QUERY_EVENT中有Q_FLAGS,MySQL binlog规范中没有指定。 The Q_FLAG number is 52. I cannot found any document describing this Q_FLAG. Q_FLAG 编号是 52。我找不到任何描述此 Q_FLAG 的文档。 Will any one know what it is?会有人知道它是什么吗? Or point me to a document to find out what is this Q_FLAG for?或者将我指向一个文档以了解此 Q_FLAG 的用途?

I found the error.我发现了错误。 The problem was according to the binlog specification, the Q_TIME_ZONE_CODE should be a 1 length byte + number byte of character of time zone code.问题是根据binlog规范,Q_TIME_ZONE_CODE应该是1个长度字节+时区码字符的数字字节。 Then I found there are four more bytes after the name, not idea what they are.然后我发现名字后面还有四个字节,不知道它们是什么。 There seems to have the following possible bugs.似乎有以下可能的错误。

  1. The four bytes after the time zone name not specified in the spec, or规范中未指定时区名称后的四个字节,或

  2. The qflag length was 4 bytes longer when there is a Q_TIME_ZONE_CODE.当有 Q_TIME_ZONE_CODE 时,qflag 长度增加了 4 个字节。

No idea if this only happen to MariaDB.不知道这是否只发生在 MariaDB 上。

Also note that using MariaDB mysqlbinlog can dump the binlog.另请注意,使用 MariaDB mysqlbinlog 可以转储 binlog。 But the mysqlbinlog in MySQL 5.6 cannot dump the log;但是MySQL 5.6中的mysqlbinlog不能dump日志; created by MariaDB 10.3由 MariaDB 10.3 创建

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM