Description:
Row-based replication of memory tables can break replication when the slave is restarted.
This has been discussed in:
https://dev.mysql.com/doc/refman/5.6/en/replication-features-memory.html
In the case of the slave existing purely for backups and as a hot spare, memory table data is irrelevant and only the table definition is needed.
I believe replication errors could be avoided by adding an option to skip replicating any memory table data and only replicate the table definition.
How to repeat:
Set up a simple master/slave replication.
On the master:
SET GLOBAL binlog_format=row;
CREATE TABLE t1 (id int) ENGINE=MEMORY;
INSERT INTO t1 VALUES (1);
Restart the MySQL process on the slave.
On the master:
DELETE FROM t1 LIMIT 1;
On the slave:
SHOW SLAVE STATUS;
will show the replication has stopped:
Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_END_OF_FILE;
Suggested fix:
Add option 'replicate_ignore_memory_data' to completely ignore data for any memory tables.