<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="table-corruption">
      </a>
      B.3.2.17 Table-Corruption Issues
     </h4>
    </div>
   </div>
  </div>
  <p>
   If you have started
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   with the
   <a class="link" href="server-system-variables.html#sysvar_myisam_recover_options">
    <code class="literal">
     myisam_recover_options
    </code>
   </a>
   system
          variable set, MySQL automatically checks and tries to repair
   <code class="literal">
    MyISAM
   </code>
   tables if they are marked as 'not
          closed properly' or 'crashed'. If this happens, MySQL writes
          an entry in the
   <code class="literal">
    hostname.err
   </code>
   file
   <code class="literal">
    'Warning: Checking table ...'
   </code>
   which is
          followed by
   <code class="literal">
    Warning: Repairing table
   </code>
   if the
          table needs to be repaired. If you get a lot of these errors,
          without
   <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
    <span class="command">
     <strong>
      mysqld
     </strong>
    </span>
   </a>
   having died unexpectedly
          just before, then something is wrong and needs to be
          investigated further.
  </p>
  <p>
   When the server detects
   <code class="literal">
    MyISAM
   </code>
   table
          corruption, it writes additional information to the error log,
          such as the name and line number of the source file, and the
          list of threads accessing the table. Example:
   <code class="literal">
    Got an
          error from thread_id=1, mi_dynrec.c:368
   </code>
   . This is
          useful information to include in bug reports.
  </p>
  <p>
   See also
   <a class="xref" href="server-options.html" title="7.1.7 Server Command Options">
    Section 7.1.7, “Server Command Options”
   </a>
   , and
   <a class="xref" href="reproducible-test-case.html" title="7.9.1.7 Making a Test Case If You Experience Table Corruption">
    Section 7.9.1.7, “Making a Test Case If You Experience Table Corruption”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
