<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="replication-bugs">
      </a>
      19.5.5 How to Report Replication Bugs or Problems
     </h3>
    </div>
   </div>
  </div>
  <p>
   When you have determined that there is no user error involved, and
      replication still either does not work at all or is unstable, it
      is time to send us a bug report. We need to obtain as much
      information as possible from you to be able to track down the bug.
      Please spend some time and effort in preparing a good bug report.
  </p>
  <p>
   If you have a repeatable test case that demonstrates the bug,
      please enter it into our bugs database using the instructions
      given in
   <a class="xref" href="bug-reports.html" title="1.6 How to Report Bugs or Problems">
    Section 1.6, “How to Report Bugs or Problems”
   </a>
   . If you have a
   <span class="quote">
    “
    <span class="quote">
     phantom
    </span>
    ”
   </span>
   problem (one that you cannot duplicate at
      will), use the following procedure:
  </p>
  <div class="orderedlist">
   <ol class="orderedlist" type="1">
    <li class="listitem">
     <p>
      Verify that no user error is involved. For example, if you
          update the replica outside of the replication threads, the
          data goes out of synchrony, and you can have unique key
          violations on updates. In this case, the replication thread
          stops and waits for you to clean up the tables manually to
          bring them into synchrony.
      <span class="emphasis">
       <em>
        This is not a replication
          problem. It is a problem of outside interference causing
          replication to fail.
       </em>
      </span>
     </p>
    </li>
    <li class="listitem">
     <p>
      Ensure that the replica is running with binary logging enabled
          (the
      <a class="link" href="replication-options-binary-log.html#sysvar_log_bin">
       <code class="literal">
        log_bin
       </code>
      </a>
      system
          variable), and with the
      <a class="link" href="replication-options-binary-log.html#sysvar_log_replica_updates">
       <code class="option">
        --log-replica-updates
       </code>
      </a>
      option
          enabled, which causes the replica to log the updates that it
          receives from the source into its own binary logs. These
          settings are the defaults.
     </p>
    </li>
    <li class="listitem">
     <p>
      Save all evidence before resetting the replication state. If
          we have no information or only sketchy information, it becomes
          difficult or impossible for us to track down the problem. The
          evidence you should collect is:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: disc; ">
       <li class="listitem">
        <p>
         All binary log files from the source
        </p>
       </li>
       <li class="listitem">
        <p>
         All binary log files from the replica
        </p>
       </li>
       <li class="listitem">
        <p>
         The output of
         <a class="link" href="show-binary-log-status.html" title="15.7.7.1 SHOW BINARY LOG STATUS Statement">
          <code class="literal">
           SHOW BINARY LOG
              STATUS
          </code>
         </a>
         from the source at the time you
              discovered the problem
        </p>
       </li>
       <li class="listitem">
        <p>
         The output of
         <a class="link" href="show-replica-status.html" title="15.7.7.35 SHOW REPLICA STATUS Statement">
          <code class="literal">
           SHOW REPLICA
              STATUS
          </code>
         </a>
         from the replica at the time you
              discovered the problem
        </p>
       </li>
       <li class="listitem">
        <p>
         Error logs from the source and the replica
        </p>
       </li>
      </ul>
     </div>
    </li>
    <li class="listitem">
     <p>
      Use
      <a class="link" href="mysqlbinlog.html" title="6.6.9 mysqlbinlog — Utility for Processing Binary Log Files">
       <span class="command">
        <strong>
         mysqlbinlog
        </strong>
       </span>
      </a>
      to examine the binary logs.
          The following should be helpful to find the problem statement.
      <em class="replaceable">
       <code>
        log_file
       </code>
      </em>
      and
      <em class="replaceable">
       <code>
        log_pos
       </code>
      </em>
      are the
      <code class="literal">
       Master_Log_File
      </code>
      and
      <code class="literal">
       Read_Master_Log_Pos
      </code>
      values from
      <a class="link" href="show-replica-status.html" title="15.7.7.35 SHOW REPLICA STATUS Statement">
       <code class="literal">
        SHOW REPLICA STATUS
       </code>
      </a>
      .
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa24352195"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">mysqlbinlog</span> <span class="token constant">--start-position</span><span class="token attr-value"><span class="token punctuation">=</span><em class="replaceable">log_pos</em></span> <em class="replaceable">log_file</em> | head</code></pre>
     </div>
    </li>
   </ol>
  </div>
  <p>
   After you have collected the evidence for the problem, try to
      isolate it as a separate test case first. Then enter the problem
      with as much information as possible into our bugs database using
      the instructions at
   <a class="xref" href="bug-reports.html" title="1.6 How to Report Bugs or Problems">
    Section 1.6, “How to Report Bugs or Problems”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
