SIGHUP导致binlog写错
AI摘要
GPT
bug描述
这是5.6中和gtid相关的一个bug,当 mysqld 收到 sighup 信号 (比如 kill -1) 的时候,会 flush binlog,但是新生成binlog开头没写 Previous_gtids_log_event,这会导致下面 2 个问题:
这个时候 mysqld 重启的话,会发现再也起不来了,error log 里有这样的错 The binary log file ‘mysql/mysql-bin.000020’ is logically corrupted: The first global transaction identifier was read, but no other information regarding identifiers existing on the previous log files was found.
这个时候主库继续更新,然后从库来拉取 binlog 的时候,io 线程会停下来 Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: ‘Error reading header of binary log while looking for the oldest binary log that contains any GTID that is not in the given gtid set’
ANALYZE-statement语法
AI摘要
GPT
命令的输出
1 | MariaDB> analyze select * from tbl1 where key1 between 10 and 200 and col1 like 'foo%'\G |