<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="events-status-info">
      </a>
      27.4.5 Event Scheduler Status
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045082037888">
  </a>
  <a class="indexterm" name="idm46045082036384">
  </a>
  <a class="indexterm" name="idm46045082035312">
  </a>
  <p>
   The Event Scheduler writes information about event execution that
      terminates with an error or warning to the MySQL Server's error
      log. See
   <a class="xref" href="events-privileges.html" title="27.4.6 The Event Scheduler and MySQL Privileges">
    Section 27.4.6, “The Event Scheduler and MySQL Privileges”
   </a>
   for an example.
  </p>
  <p>
   To obtain information about the state of the Event Scheduler for
      debugging and troubleshooting purposes, run
   <a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
    <span class="command">
     <strong>
      mysqladmin
      debug
     </strong>
    </span>
   </a>
   (see
   <a class="xref" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
    Section 6.5.2, “mysqladmin — A MySQL Server Administration Program”
   </a>
   ); after running
      this command, the server's error log contains output relating to
      the Event Scheduler, similar to what is shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-none"><div class="docs-select-all right" id="sa37892863"><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">Events status:
LLA = Last Locked At  LUA = Last Unlocked At
WOC = Waiting On Condition  DL = Data Locked

Event scheduler status:
State      : INITIALIZED
Thread id  : 0
LLA        : n/a:0
LUA        : n/a:0
WOC        : NO
Workers    : 0
Executed   : 0
Data locked: NO

Event queue status:
Element count   : 0
Data locked     : NO
Attempting lock : NO
LLA             : init_queue:95
LUA             : init_queue:103
WOC             : NO
Next activation : never</code></pre>
  </div>
  <p>
   In statements that occur as part of events executed by the Event
      Scheduler, diagnostics messages (not only errors, but also
      warnings) are written to the error log, and, on Windows, to the
      application event log. For frequently executed events, it is
      possible for this to result in many logged messages. For example,
      for
   <code class="literal">
    SELECT ... INTO
    <em class="replaceable">
     <code>
      var_list
     </code>
    </em>
   </code>
   statements, if the
      query returns no rows, a warning with error code 1329 occurs
      (
   <code class="literal">
    No data
   </code>
   ), and the variable values remain
      unchanged. If the query returns multiple rows, error 1172 occurs
      (
   <code class="literal">
    Result consisted of more than one row
   </code>
   ). For
      either condition, you can avoid having the warnings be logged by
      declaring a condition handler; see
   <a class="xref" href="declare-handler.html" title="15.6.7.2 DECLARE ... HANDLER Statement">
    Section 15.6.7.2, “DECLARE ... HANDLER Statement”
   </a>
   . For statements that may
      retrieve multiple rows, another strategy is to use
   <code class="literal">
    LIMIT
      1
   </code>
   to limit the result set to a single row.
  </p>
 </div>
 <br/>
</div>
