<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-ndbinfo-cluster-transactions">
      </a>
      25.6.17.9 The ndbinfo cluster_transactions Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045090279856">
  </a>
  <p>
   The
   <code class="literal">
    cluster_transactions
   </code>
   table shows
        information about all ongoing transactions in an NDB Cluster.
  </p>
  <p>
   The
   <code class="literal">
    cluster_transactions
   </code>
   table contains the
        following columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       node_id
      </code>
     </p>
     <p>
      Node ID of transaction coordinator
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       block_instance
      </code>
     </p>
     <p>
      TC block instance
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       transid
      </code>
     </p>
     <p>
      Transaction ID
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       state
      </code>
     </p>
     <p>
      Operation state (see text for possible values)
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       count_operations
      </code>
     </p>
     <p>
      Number of stateful primary key operations in transaction
            (includes reads with locks, as well as DML operations)
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       outstanding_operations
      </code>
     </p>
     <p>
      Operations still being executed in local data management
            blocks
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       inactive_seconds
      </code>
     </p>
     <p>
      Time spent waiting for API
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       client_node_id
      </code>
     </p>
     <p>
      Client node ID
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       client_block_ref
      </code>
     </p>
     <p>
      Client block reference
     </p>
    </li>
   </ul>
  </div>
  <h5>
   <a name="idm46045090258384">
   </a>
   Notes
  </h5>
  <p>
   The transaction ID is a unique 64-bit number which can be
        obtained using the NDB API's
   <a class="ulink" href="/doc/ndbapi/en/ndb-ndbtransaction.html#ndb-ndbtransaction-gettransactionid" target="_top">
    <code class="literal">
     getTransactionId()
    </code>
   </a>
   method. (Currently, the MySQL Server does not expose the NDB API
        transaction ID of an ongoing transaction.)
  </p>
  <p>
   <code class="literal">
    block_instance
   </code>
   refers to an instance of a
        kernel block. Together with the block name, this number can be
        used to look up a given instance in the
   <a class="link" href="mysql-cluster-ndbinfo-threadblocks.html" title="25.6.17.62 The ndbinfo threadblocks Table">
    <code class="literal">
     threadblocks
    </code>
   </a>
   table.
  </p>
  <p>
   The
   <code class="literal">
    state
   </code>
   column can have any one of the
        values
   <code class="literal">
    CS_ABORTING
   </code>
   ,
   <code class="literal">
    CS_COMMITTING
   </code>
   ,
   <code class="literal">
    CS_COMMIT_SENT
   </code>
   ,
   <code class="literal">
    CS_COMPLETE_SENT
   </code>
   ,
   <code class="literal">
    CS_COMPLETING
   </code>
   ,
   <code class="literal">
    CS_CONNECTED
   </code>
   ,
   <code class="literal">
    CS_DISCONNECTED
   </code>
   ,
   <code class="literal">
    CS_FAIL_ABORTED
   </code>
   ,
   <code class="literal">
    CS_FAIL_ABORTING
   </code>
   ,
   <code class="literal">
    CS_FAIL_COMMITTED
   </code>
   ,
   <code class="literal">
    CS_FAIL_COMMITTING
   </code>
   ,
   <code class="literal">
    CS_FAIL_COMPLETED
   </code>
   ,
   <code class="literal">
    CS_FAIL_PREPARED
   </code>
   ,
   <code class="literal">
    CS_PREPARE_TO_COMMIT
   </code>
   ,
   <code class="literal">
    CS_RECEIVING
   </code>
   ,
   <code class="literal">
    CS_REC_COMMITTING
   </code>
   ,
   <code class="literal">
    CS_RESTART
   </code>
   ,
   <code class="literal">
    CS_SEND_FIRE_TRIG_REQ
   </code>
   ,
   <code class="literal">
    CS_STARTED
   </code>
   ,
   <code class="literal">
    CS_START_COMMITTING
   </code>
   ,
   <code class="literal">
    CS_START_SCAN
   </code>
   ,
   <code class="literal">
    CS_WAIT_ABORT_CONF
   </code>
   ,
   <code class="literal">
    CS_WAIT_COMMIT_CONF
   </code>
   ,
   <code class="literal">
    CS_WAIT_COMPLETE_CONF
   </code>
   ,
   <code class="literal">
    CS_WAIT_FIRE_TRIG_REQ
   </code>
   . (If the MySQL Server
        is running with
   <a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_show_hidden">
    <code class="literal">
     ndbinfo_show_hidden
    </code>
   </a>
   enabled,
        you can view this list of states by selecting from the
   <code class="literal">
    ndb$dbtc_apiconnect_state
   </code>
   table, which is
        normally hidden.)
  </p>
  <p>
   In
   <code class="literal">
    client_node_id
   </code>
   and
   <code class="literal">
    client_block_ref
   </code>
   ,
   <code class="literal">
    client
   </code>
   refers to an NDB Cluster API or SQL node (that is, an NDB API
        client or a MySQL Server attached to the cluster).
  </p>
  <p>
   The
   <code class="literal">
    tc_block_instance
   </code>
   column provides the
   <a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-dbtc.html" target="_top">
    <code class="literal">
     DBTC
    </code>
   </a>
   block instance number.
        You can use this along with the block name to obtain information
        about specific threads from the
   <a class="link" href="mysql-cluster-ndbinfo-threadblocks.html" title="25.6.17.62 The ndbinfo threadblocks Table">
    <code class="literal">
     threadblocks
    </code>
   </a>
   table.
  </p>
 </div>
 <br/>
</div>
