<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="performance-schema-user-variable-tables">
      </a>
      29.12.10 Performance Schema User-Defined Variable Tables
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045071796832">
  </a>
  <a class="indexterm" name="idm46045071795376">
  </a>
  <p>
   The Performance Schema provides a
   <a class="link" href="performance-schema-user-variable-tables.html" title="29.12.10 Performance Schema User-Defined Variable Tables">
    <code class="literal">
     user_variables_by_thread
    </code>
   </a>
   table that
        exposes user-defined variables. These are variables defined
        within a specific session and include a
   <code class="literal">
    @
   </code>
   character preceding the name; see
   <a class="xref" href="user-variables.html" title="11.4 User-Defined Variables">
    Section 11.4, “User-Defined Variables”
   </a>
   .
  </p>
  <p>
   The
   <a class="link" href="performance-schema-user-variable-tables.html" title="29.12.10 Performance Schema User-Defined Variable Tables">
    <code class="literal">
     user_variables_by_thread
    </code>
   </a>
   table
        has these columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       THREAD_ID
      </code>
     </p>
     <p>
      The thread identifier of the session in which the variable
            is defined.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       VARIABLE_NAME
      </code>
     </p>
     <p>
      The variable name, without the leading
      <code class="literal">
       @
      </code>
      character.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       VARIABLE_VALUE
      </code>
     </p>
     <p>
      The variable value.
     </p>
    </li>
   </ul>
  </div>
  <p>
   The
   <a class="link" href="performance-schema-user-variable-tables.html" title="29.12.10 Performance Schema User-Defined Variable Tables">
    <code class="literal">
     user_variables_by_thread
    </code>
   </a>
   table
        has these indexes:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Primary key on (
      <code class="literal">
       THREAD_ID
      </code>
      ,
      <code class="literal">
       VARIABLE_NAME
      </code>
      )
     </p>
    </li>
   </ul>
  </div>
  <p>
   <a class="link" href="truncate-table.html" title="15.1.37 TRUNCATE TABLE Statement">
    <code class="literal">
     TRUNCATE TABLE
    </code>
   </a>
   is not permitted
        for the
   <a class="link" href="performance-schema-user-variable-tables.html" title="29.12.10 Performance Schema User-Defined Variable Tables">
    <code class="literal">
     user_variables_by_thread
    </code>
   </a>
   table.
  </p>
 </div>
 <br/>
</div>
