The LOST_EVENTS incident: When is it reported?

This is a follow-up on my previous blog entry explaining when the LOST_EVENTS incident occurs.

The LOST_EVENTS incident is reported in the MySQL binary log in two cases. Each time the Slave will try to tell you why. Here is an example output of the SHOW SLAVE STATUS done on the Slave MySQL Cluster (bit edited to fit):

 mysql> SHOW SLAVE STATUS\G
       Last_Errno: 1590
       Last_Error: The incident LOST_EVENTS occured on the master.
           **Message: mysqld startup**

The message can be one of the following (MySQL Cluster 7.0.7):

  • mysqld startup: SQL Node (mysqld) acting as Master was started.
  • cluster disconnect: SQL Node acting as Master lost connection to its data nodes.

You can easily check for LOST_EVENTS in the binary logs on the Master using the following shell script:

cd /where/binlog/are/
for f in `ls binglog.*`;
do
  echo $f
  mysqlbinlog $f | grep LOST_EVENTS
done