Bug #56019 Blackhole slave replication: 2nd slave stops for two REPLACE statements
Submitted: 16 Aug 2010 15:47 Modified: 31 Jan 2013 11:49
Reporter: Serge Kozlov Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Server: Documentation Severity:S2 (Serious)
Version:5.6.99-m5 OS:Any
Assigned to: Jon Stephens CPU Architecture:Any
Tags: blackhole slave, HA_ERR_FOUND_DUPP_KEY, nuts, row

[16 Aug 2010 15:47] Serge Kozlov
There is the replication chain:

master ----STMT/MIXED----> slave ----ROW----> slave2.

1st slave started with --default-storage=blackhole, master and slave2 use MyISAM or InnoDB as default engine.

Master sets mixed or statement binlog format, slave is row.

Run on master following statements and sync the chain:

2nd slave (slave2) is stopped (SQL thread):

100816 18:39:18 [Note] Plugin 'FEDERATED' is disabled.
100816 18:39:18 [Note] Plugin 'ndbcluster' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Compressed tables use zlib 1.2.3
100816 18:39:18  InnoDB: highest supported file format is Barracuda.
100816 18:39:19 InnoDB 1.2.0 started; log sequence number 1595675
100816 18:39:19 [Warning] /home/ksm/oracle/repo/build-next-mr/sql/.libs/lt-mysqld: unknown variable 'loose-debug-sync-timeout=300'
100816 18:39:19 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 6f3c5d16-a94c-11df-bd7e-0800272f46ab.
100816 18:39:19 [Note] Event Scheduler: Loaded 0 events
100816 18:39:19 [Note] /home/ksm/oracle/repo/build-next-mr/sql/.libs/lt-mysqld: ready for connections.
Version: '5.6.99-m5-log'  socket: '/home/ksm/oracle/repo/build-next-mr/mysql-test/var/tmp/mysqld.3.sock'  port: 13002  Source distribution
100816 18:39:20 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=mysqld-relay-bin' to avoid this problem.
100816 18:39:20 [Note] 'CHANGE MASTER TO executed'. Previous state master_host='', master_port='3306', master_log_file='', master_log_pos='4'. New state master_host='', master_port='13001', master_log_file='slave-bin.000001', master_log_pos='4'.
100816 18:39:20 [Note] Slave I/O thread: connected to master 'root@',replication started in log 'slave-bin.000001' at position 4
100816 18:39:20 [Note] Slave SQL thread initialized, starting replication in log 'slave-bin.000001' at position 4, relay log './mysqld-relay-bin.000001' position: 4
100816 18:39:20 [ERROR] Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log slave-bin.000001, end_log_pos 569, Error_code: 1062
100816 18:39:20 [Warning] Slave: Duplicate entry '1' for key 'PRIMARY' Error_code: 1062
100816 18:39:20 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'slave-bin.000001' position 426

How to repeat:
Run attached test case with MTR option --skip-combinations
[16 Aug 2010 15:50] Serge Kozlov
The test case

Attachment: bug56019.tgz (application/x-gzip, text), 970 bytes.

[29 Sep 2010 23:09] Alfranio Junior
This problem does not happen after WL#5092 what was pushed to next-mr-stage.
[10 Oct 2010 20:32] Alfranio Junior
WL#5092 is merged into next-mr.
[4 Dec 2012 7:53] Jon Stephens
I've been asked to determine whether or not this is an issue in current GA or development series, and if so, to document it.