title: Can I use mysql binlog from master as relay log on slave?
body: <p>I have following Mysql replication schema:</p>
  
  <blockquote>
    <p>A(master)->B(slave/master)->C(slave)</p>
  </blockquote>
  
  <ul>
  <li>A writes binlog</li>
  <li>B reads A's binlog applies relaylog and writes it's own binlog</li>
  <li>C reads from B and applies.</li>
  </ul>
  
  <p>If replication become broken by some reason (A->B) can I copy A's binlog, find which position is corresponded to B last executed statement and replay it.
  Is order of transactions/statements in bin/relay logs the same in all  replication chain? (Replication uses one thread so it might be the same order.)</p>
  
  <p><strong>Update</strong>: I should have asked like: "Is the order of statements/transactions in binlogs the same across all replication chain? Can we replay any log on any host  and  repoint any slave(c) to master (A)"
  Seems that the answer is: "Yes". But official confirmation or documentation(source code) link hasn't been posted yet.</p>
  
  <p><strong>UPDATE2</strong>: from official docs to <a href="https://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_support_xa" rel="nofollow noreferrer">innodb_support_xa</a>:</p>
  
  <blockquote>
    <p>Enables InnoDB support for two-phase commit in XA transactions, causing an extra disk flush for transaction preparation. The XA mechanism is used internally and is essential for any server that has its binary log turned on and is accepting changes to its data from more than one thread. If you disable innodb_support_xa, transactions can be written to the binary log in a different order than the live database is committing them, which can produce different data when the binary log is replayed in disaster recovery or on a replication slave.</p>
  </blockquote>