<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-ndbinfo-server-transactions">
      </a>
      25.6.17.56 The ndbinfo server_transactions Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045087849552">
  </a>
  <p>
   The
   <code class="literal">
    server_transactions
   </code>
   table is subset of
        the
   <a class="link" href="mysql-cluster-ndbinfo-cluster-transactions.html" title="25.6.17.9 The ndbinfo cluster_transactions Table">
    <code class="literal">
     cluster_transactions
    </code>
   </a>
   table, but includes only those transactions in which the current
        SQL node (MySQL Server) is a participant, while including the
        relevant connection IDs.
  </p>
  <p>
   The
   <code class="literal">
    server_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">
       mysql_connection_id
      </code>
     </p>
     <p>
      MySQL Server connection ID
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       node_id
      </code>
     </p>
     <p>
      Transaction coordinator node ID
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       block_instance
      </code>
     </p>
     <p>
      Transaction coordinator 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 operations in the transaction
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       outstanding_operations
      </code>
     </p>
     <p>
      Operations still being executed by local data management
            layer (LQH 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="idm46045087824832">
   </a>
   Notes
  </h5>
  <p>
   The
   <code class="literal">
    mysql_connection_id
   </code>
   is the same as the
        connection or session ID shown in the output of
   <a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
    <code class="literal">
     SHOW PROCESSLIST
    </code>
   </a>
   . It is obtained
        from the
   <code class="literal">
    INFORMATION_SCHEMA
   </code>
   table
   <a class="link" href="information-schema-ndb-transid-mysql-connection-map-table.html" title="28.3.18 The INFORMATION_SCHEMA ndb_transid_mysql_connection_map Table">
    <code class="literal">
     NDB_TRANSID_MYSQL_CONNECTION_MAP
    </code>
   </a>
   .
  </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 transaction ID (
   <code class="literal">
    transid
   </code>
   ) 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>
   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">
    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>
   kernel block instance
        number. You can use this 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>
