Bug #14696 RBR->SBR Replication fails without any error message
Submitted: 7 Nov 2005 10:32 Modified: 15 Nov 2005 15:08
Reporter: Lars Thalmann Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:mysql-5.0-wl1012 OS:
Assigned to: Mats Kindahl CPU Architecture:Any

[7 Nov 2005 10:32] Lars Thalmann
Description:
Setup the replication like this:

  ServerA (RBR) ---> ServerB(SBR) ---> ServerC

Then nothing is logged in B. There is no statement to log since the rows are
applied directly to the storage engine. If RBR is enabled, the rows are
written to the binary log of server B.   But if it is not enabled, then nothing 
logged at all in B and there is no error message.

How to repeat:
Only affects the mysql-5.0-1012 clone.

Suggested fix:
Use Guilhems proposal:

On slave, in Table_map_log_event::exec_event():

IF (table will not be ignored due to --replicate-* rules
   and
    log-bin
   and
    log_slave_updates
   and
    !binlog_row_based [i.e. this slave is doing SBR only]
  )
THEN
   issue error because slave's binlog, which MUST contain the
   changes done by the slave thread (because of --log-bin
   and --log-slave-updates), will not contain the changes
   related to this RBR event.
   And stop slave thread immediately, telling the DBA
   that RBR must be used on this slave if he wants to use
   --log-slave-updates.