<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="replication-features-limit">
      </a>
      19.5.1.18 Replication and LIMIT
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045135409728">
  </a>
  <a class="indexterm" name="idm46045135408240">
  </a>
  <p>
   Statement-based replication of
   <code class="literal">
    LIMIT
   </code>
   clauses
        in
   <a class="link" href="delete.html" title="15.2.2 DELETE Statement">
    <code class="literal">
     DELETE
    </code>
   </a>
   ,
   <a class="link" href="update.html" title="15.2.17 UPDATE Statement">
    <code class="literal">
     UPDATE
    </code>
   </a>
   , and
   <a class="link" href="insert-select.html" title="15.2.7.1 INSERT ... SELECT Statement">
    <code class="literal">
     INSERT ...
        SELECT
    </code>
   </a>
   statements is unsafe since the order of the
        rows affected is not defined. (Such statements can be replicated
        correctly with statement-based replication only if they also
        contain an
   <code class="literal">
    ORDER BY
   </code>
   clause.) When such a
        statement is encountered:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      When using
      <code class="literal">
       STATEMENT
      </code>
      mode, a warning that
            the statement is not safe for statement-based replication is
            now issued.
     </p>
     <p>
      When using
      <code class="literal">
       STATEMENT
      </code>
      mode, warnings are
            issued for DML statements containing
      <code class="literal">
       LIMIT
      </code>
      even when they also have an
      <code class="literal">
       ORDER BY
      </code>
      clause (and so are made
            deterministic). This is a known issue. (Bug #42851)
     </p>
    </li>
    <li class="listitem">
     <p>
      When using
      <code class="literal">
       MIXED
      </code>
      mode, the statement is
            now automatically replicated using row-based mode.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
