<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="out-of-memory">
      </a>
      B.3.2.6 Out of memory
     </h4>
    </div>
   </div>
  </div>
  <p>
   If you issue a query using the
   <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
    <span class="command">
     <strong>
      mysql
     </strong>
    </span>
   </a>
   client
          program and receive an error like the following one, it means
          that
   <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
    <span class="command">
     <strong>
      mysql
     </strong>
    </span>
   </a>
   does not have enough memory to
          store the entire query result:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-none"><div class="docs-select-all right" id="sa44193914"><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-none">mysql: Out of memory at line 42, 'malloc.c'
mysql: needed 8136 byte (8k), memory in use: 12481367 bytes (12189k)
ERROR 2008: MySQL client ran out of memory</code></pre>
  </div>
  <p>
   To remedy the problem, first check whether your query is
          correct. Is it reasonable that it should return so many rows?
          If not, correct the query and try again. Otherwise, you can
          invoke
   <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
    <span class="command">
     <strong>
      mysql
     </strong>
    </span>
   </a>
   with the
   <a class="link" href="mysql-command-options.html#option_mysql_quick">
    <code class="option">
     --quick
    </code>
   </a>
   option. This causes it
          to use the
   <a class="ulink" href="/doc/c-api/8.4/en/mysql-use-result.html" target="_top">
    <code class="literal">
     mysql_use_result()
    </code>
   </a>
   C API function to retrieve the result set, which places less
          of a load on the client (but more on the server).
  </p>
 </div>
 <br/>
</div>
