Bug #77137 Option to skip replicating memory table data

Submitted: 22 May 2015 21:17
Reporter: Juha-Pekka Järvenpää Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:all OS:Any
Assigned to: CPU Architecture:Any
Tags: Memory, replication

[22 May 2015 21:17] Juha-Pekka Järvenpää
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.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.