<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="innodb-online-ddl-failure-conditions">
      </a>
      17.12.7 Online DDL Failure Conditions
     </h3>
    </div>
   </div>
  </div>
  <p>
   The failure of an online DDL operation is typically due to one of
      the following conditions:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      An
      <code class="literal">
       ALGORITHM
      </code>
      clause specifies an algorithm
          that is not compatible with the particular type of DDL
          operation or storage engine.
     </p>
    </li>
    <li class="listitem">
     <p>
      A
      <code class="literal">
       LOCK
      </code>
      clause specifies a low degree of
          locking (
      <code class="literal">
       SHARED
      </code>
      or
      <code class="literal">
       NONE
      </code>
      )
          that is not compatible with the particular type of DDL
          operation.
     </p>
    </li>
    <li class="listitem">
     <p>
      A timeout occurs while waiting for an
      <a class="link" href="glossary.html#glos_exclusive_lock" title="exclusive lock">
       exclusive lock
      </a>
      on
          the table, which may be needed briefly during the initial and
          final phases of the DDL operation.
     </p>
    </li>
    <li class="listitem">
     <p>
      The
      <a class="link" href="server-system-variables.html#sysvar_tmpdir">
       <code class="literal">
        tmpdir
       </code>
      </a>
      or
      <a class="link" href="innodb-parameters.html#sysvar_innodb_tmpdir">
       <code class="literal">
        innodb_tmpdir
       </code>
      </a>
      file system
          runs out of disk space, while MySQL writes temporary sort
          files on disk during index creation. For more information, see
      <a class="xref" href="innodb-online-ddl-space-requirements.html" title="17.12.3 Online DDL Space Requirements">
       Section 17.12.3, “Online DDL Space Requirements”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      The operation takes a long time and concurrent DML modifies
          the table so much that the size of the temporary online log
          exceeds the value of the
      <a class="link" href="innodb-parameters.html#sysvar_innodb_online_alter_log_max_size">
       <code class="literal">
        innodb_online_alter_log_max_size
       </code>
      </a>
      configuration option. This condition causes a
      <code class="literal">
       DB_ONLINE_LOG_TOO_BIG
      </code>
      error.
     </p>
    </li>
    <li class="listitem">
     <p>
      Concurrent DML makes changes to the table that are allowed
          with the original table definition, but not with the new one.
          The operation only fails at the very end, when MySQL tries to
          apply all the changes from concurrent DML statements. For
          example, you might insert duplicate values into a column while
          a unique index is being created, or you might insert
      <code class="literal">
       NULL
      </code>
      values into a column while creating a
      <a class="link" href="glossary.html#glos_primary_key" title="primary key">
       primary key
      </a>
      index on
          that column. The changes made by the concurrent DML take
          precedence, and the
      <a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
       <code class="literal">
        ALTER TABLE
       </code>
      </a>
      operation is effectively
      <a class="link" href="glossary.html#glos_rollback" title="rollback">
       rolled
          back
      </a>
      .
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
