起因很复杂,就不解释了。
mysql 5.6.20
现象:
mysqlbinlog解析binlog时,发现文件头的信息如下:
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#700101 8:00:00 server id 169019238 end_log_pos 120 CRC32 0xb825a5f1 Start: binlog v 4, server v 5.6.20-ucloudrel1-log created 700101 8:00:00
# Warning: this binlog is either in use or was not closed properly.
BINLOG '
AAAAAA9mBxMKdAAAAHgAAAABAAQANS42LjIwLXVjbG91ZHJlbDEtbG9nAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAfGl
Jbg=
'/*!*/;
# at 120
#160810 19:16:59 server id 169019238 end_log_pos 199 CRC32 0x71012148 Query thread_id=15 exec_time=0 error_code=0
SET TIMESTAMP=1470827819/*!*/;
SET @@session.pseudo_thread_id=15/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1073741824/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=33/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
怎么会有1970年的时候呢?
查看了正常和不正常的区别:
不正常的日志文件中有:
Status information:
Current dir:
Running threads: 1 Stack size: 262144
Current locks:
lock: 0x2cc3ff0:
lock: 0x2c8cc30:
lock: 0x2c82000:
lock: 0x2c75670:
lock: 0x2c64430:
lock: 0x2c5e670:
lock: 0x2c593b0:
lock: 0x2c52e70:
lock: 0x2c4a9d0:
lock: 0xf48200:
lock: 0xf488c0:
lock: 0xf48800:
lock: 0xf48740:
lock: 0xf48380:
这些东西,参考文档:http://dev.mysql.com/doc/refman/5.7/en/server-signal-response.html
里面说发送了sighup信号日志文件中会出现上面的东西。
就对数据库进行尝试,发送sighup信号后,发现生成的binlog是有上面的问题。
在mysql 5.5.12中没有这个问题。
转载请注明源出处
QQ 273002188 欢迎一起学习
QQ 群 236941212
oracle,mysql,PG 相互交流
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25099483/viewspace-2123296/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25099483/viewspace-2123296/