Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
MySQL manual (https://dev.mysql.com/doc/refman/5.6/en/memory-storage-engine.html) clearly says the following about MEMORY tables:
"When a replication source server shuts down and restarts, its MEMORY tables become empty. To replicate this effect to replicas, the first time that the source uses a given MEMORY table after startup, it logs an event that notifies replicas that the table must be emptied by writing a DELETE statement for that table to the binary log. When a replica server shuts down and restarts, its MEMORY tables also become empty, and it writes a DELETE statement to its own binary log, which is passed on to any downstream replicas."
Our KB page on MEMORY engine (https://mariadb.com/kb/en/memory-storage-engine/) does not say anything about this behaviour and it's a surprise then to see a slave generating these DELETEs at a random point of time after restart during any kind of access to the table, even via information_schema.tables query. This breaks strict GTID-based replication and comes as a surprise, as neither general query log nor audit log contains such DELETE statements.