<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="innodb-information-schema-internal-data">
      </a>
      17.15.2.3 Persistence and Consistency of InnoDB Transaction and Locking
Information
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045150503296">
  </a>
  <p>
   The data exposed by the transaction and locking tables
        (
   <code class="literal">
    INFORMATION_SCHEMA
   </code>
   <a class="link" href="information-schema-innodb-trx-table.html" title="28.4.28 The INFORMATION_SCHEMA INNODB_TRX Table">
    <code class="literal">
     INNODB_TRX
    </code>
   </a>
   table, Performance
        Schema
   <a class="link" href="performance-schema-data-locks-table.html" title="29.12.13.1 The data_locks Table">
    <code class="literal">
     data_locks
    </code>
   </a>
   and
   <a class="link" href="performance-schema-data-lock-waits-table.html" title="29.12.13.2 The data_lock_waits Table">
    <code class="literal">
     data_lock_waits
    </code>
   </a>
   tables) represents
        a glimpse into fast-changing data. This is not like user tables,
        where the data changes only when application-initiated updates
        occur. The underlying data is internal system-managed data, and
        can change very quickly:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Data might not be consistent between the
      <a class="link" href="information-schema-innodb-trx-table.html" title="28.4.28 The INFORMATION_SCHEMA INNODB_TRX Table">
       <code class="literal">
        INNODB_TRX
       </code>
      </a>
      ,
      <a class="link" href="performance-schema-data-locks-table.html" title="29.12.13.1 The data_locks Table">
       <code class="literal">
        data_locks
       </code>
      </a>
      , and
      <a class="link" href="performance-schema-data-lock-waits-table.html" title="29.12.13.2 The data_lock_waits Table">
       <code class="literal">
        data_lock_waits
       </code>
      </a>
      tables.
     </p>
     <p>
      The
      <a class="link" href="performance-schema-data-locks-table.html" title="29.12.13.1 The data_locks Table">
       <code class="literal">
        data_locks
       </code>
      </a>
      and
      <a class="link" href="performance-schema-data-lock-waits-table.html" title="29.12.13.2 The data_lock_waits Table">
       <code class="literal">
        data_lock_waits
       </code>
      </a>
      tables expose
            live data from the
      <code class="literal">
       InnoDB
      </code>
      storage engine,
            to provide lock information about the transactions in the
      <a class="link" href="information-schema-innodb-trx-table.html" title="28.4.28 The INFORMATION_SCHEMA INNODB_TRX Table">
       <code class="literal">
        INNODB_TRX
       </code>
      </a>
      table. Data
            retrieved from the lock tables exists when the
      <a class="link" href="select.html" title="15.2.13 SELECT Statement">
       <code class="literal">
        SELECT
       </code>
      </a>
      is executed, but might
            be gone or changed by the time the query result is consumed
            by the client.
     </p>
     <p>
      Joining
      <a class="link" href="performance-schema-data-locks-table.html" title="29.12.13.1 The data_locks Table">
       <code class="literal">
        data_locks
       </code>
      </a>
      with
      <a class="link" href="performance-schema-data-lock-waits-table.html" title="29.12.13.2 The data_lock_waits Table">
       <code class="literal">
        data_lock_waits
       </code>
      </a>
      can show rows
            in
      <a class="link" href="performance-schema-data-lock-waits-table.html" title="29.12.13.2 The data_lock_waits Table">
       <code class="literal">
        data_lock_waits
       </code>
      </a>
      that
            identify a parent row in
      <a class="link" href="performance-schema-data-locks-table.html" title="29.12.13.1 The data_locks Table">
       <code class="literal">
        data_locks
       </code>
      </a>
      that no longer
            exists or does not exist yet.
     </p>
    </li>
    <li class="listitem">
     <p>
      Data in the transaction and locking tables might not be
            consistent with data in the
      <code class="literal">
       INFORMATION_SCHEMA
      </code>
      <a class="link" href="information-schema-processlist-table.html" title="28.3.23 The INFORMATION_SCHEMA PROCESSLIST Table">
       <code class="literal">
        PROCESSLIST
       </code>
      </a>
      table or
            Performance Schema
      <a class="link" href="performance-schema-threads-table.html" title="29.12.22.8 The threads Table">
       <code class="literal">
        threads
       </code>
      </a>
      table.
     </p>
     <p>
      For example, you should be careful when comparing data in
            the
      <code class="literal">
       InnoDB
      </code>
      transaction and locking tables
            with data in the
      <a class="link" href="information-schema-processlist-table.html" title="28.3.23 The INFORMATION_SCHEMA PROCESSLIST Table">
       <code class="literal">
        PROCESSLIST
       </code>
      </a>
      table. Even if you issue a single
      <code class="literal">
       SELECT
      </code>
      (joining
      <a class="link" href="information-schema-innodb-trx-table.html" title="28.4.28 The INFORMATION_SCHEMA INNODB_TRX Table">
       <code class="literal">
        INNODB_TRX
       </code>
      </a>
      and
      <a class="link" href="information-schema-processlist-table.html" title="28.3.23 The INFORMATION_SCHEMA PROCESSLIST Table">
       <code class="literal">
        PROCESSLIST
       </code>
      </a>
      , for example), the
            content of those tables is generally not consistent. It is
            possible for
      <a class="link" href="information-schema-innodb-trx-table.html" title="28.4.28 The INFORMATION_SCHEMA INNODB_TRX Table">
       <code class="literal">
        INNODB_TRX
       </code>
      </a>
      to
            reference rows that are not present in
      <a class="link" href="information-schema-processlist-table.html" title="28.3.23 The INFORMATION_SCHEMA PROCESSLIST Table">
       <code class="literal">
        PROCESSLIST
       </code>
      </a>
      or for the
            currently executing SQL query of a transaction shown in
      <code class="literal">
       INNODB_TRX.TRX_QUERY
      </code>
      to differ from the
            one in
      <code class="literal">
       PROCESSLIST.INFO
      </code>
      .
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
