<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="performance-schema-replication-connection-status-table">
      </a>
      29.12.11.13 The replication_connection_status Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045070890720">
  </a>
  <a class="indexterm" name="idm46045070889216">
  </a>
  <p>
   This table shows the current status of the I/O thread that
          handles the replica's connection to the source,
          information on the last transaction queued in the relay log,
          and information on the transaction currently being queued in
          the relay log.
  </p>
  <p>
   Compared to the
   <a class="link" href="performance-schema-replication-connection-configuration-table.html" title="29.12.11.11 The replication_connection_configuration Table">
    <code class="literal">
     replication_connection_configuration
    </code>
   </a>
   table,
   <a class="link" href="performance-schema-replication-connection-status-table.html" title="29.12.11.13 The replication_connection_status Table">
    <code class="literal">
     replication_connection_status
    </code>
   </a>
   changes more frequently. It contains values that change during
          the connection, whereas
   <a class="link" href="performance-schema-replication-connection-configuration-table.html" title="29.12.11.11 The replication_connection_configuration Table">
    <code class="literal">
     replication_connection_configuration
    </code>
   </a>
   contains values which define how the replica connects to the
          source and that remain constant during the connection.
  </p>
  <p>
   The
   <a class="link" href="performance-schema-replication-connection-status-table.html" title="29.12.11.13 The replication_connection_status Table">
    <code class="literal">
     replication_connection_status
    </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">
       CHANNEL_NAME
      </code>
     </p>
     <p>
      The replication channel which this row is displaying.
              There is always a default replication channel, and more
              replication channels can be added. See
      <a class="xref" href="replication-channels.html" title="19.2.2 Replication Channels">
       Section 19.2.2, “Replication Channels”
      </a>
      for more
              information.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       GROUP_NAME
      </code>
     </p>
     <p>
      If this server is a member of a group, shows the name of
              the group the server belongs to.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       SOURCE_UUID
      </code>
     </p>
     <p>
      The
      <a class="link" href="replication-options.html#sysvar_server_uuid">
       <code class="literal">
        server_uuid
       </code>
      </a>
      value
              from the source.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       THREAD_ID
      </code>
     </p>
     <p>
      The I/O thread ID.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       SERVICE_STATE
      </code>
     </p>
     <p>
      <code class="literal">
       ON
      </code>
      (thread exists and is active or
              idle),
      <code class="literal">
       OFF
      </code>
      (thread no longer exists),
              or
      <code class="literal">
       CONNECTING
      </code>
      (thread exists and is
              connecting to the source).
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       RECEIVED_TRANSACTION_SET
      </code>
     </p>
     <p>
      The set of global transaction IDs (GTIDs) corresponding to
              all transactions received by this replica. Empty if GTIDs
              are not in use. See
      <a class="xref" href="replication-gtids-concepts.html#replication-gtids-concepts-gtid-sets" title="GTID Sets">
       GTID Sets
      </a>
      for
              more information.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_ERROR_NUMBER
      </code>
      ,
      <code class="literal">
       LAST_ERROR_MESSAGE
      </code>
     </p>
     <p>
      The error number and error message of the most recent
              error that caused the I/O thread to stop. An error number
              of 0 and message of the empty string mean
      <span class="quote">
       “
       <span class="quote">
        no
              error.
       </span>
       ”
      </span>
      If the
      <code class="literal">
       LAST_ERROR_MESSAGE
      </code>
      value is not empty,
              the error values also appear in the replica's error
              log.
     </p>
     <p>
      Issuing
      <a class="link" href="reset-binary-logs-and-gtids.html" title="15.4.1.2 RESET BINARY LOGS AND GTIDS Statement">
       <code class="literal">
        RESET BINARY LOGS AND
              GTIDS
       </code>
      </a>
      or
      <a class="link" href="reset-replica.html" title="15.4.2.3 RESET REPLICA Statement">
       <code class="literal">
        RESET
              REPLICA
       </code>
      </a>
      resets the values shown in these
              columns.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_ERROR_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the most recent I/O error took
              place.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_HEARTBEAT_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the most recent heartbeat signal
              was received by a replica.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       COUNT_RECEIVED_HEARTBEATS
      </code>
     </p>
     <p>
      The total number of heartbeat signals that a replica
              received since the last time it was restarted or reset, or
              a
      <a class="link" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
       <code class="literal">
        CHANGE REPLICATION SOURCE
              TO
       </code>
      </a>
      statement was issued.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_QUEUED_TRANSACTION
      </code>
     </p>
     <p>
      The global transaction ID (GTID) of the last transaction
              that was queued to the relay log.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_QUEUED_TRANSACTION_ORIGINAL_COMMIT_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the last transaction queued in the
              relay log was committed on the original source.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_QUEUED_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the last transaction queued in the
              relay log was committed on the immediate source.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_QUEUED_TRANSACTION_START_QUEUE_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the last transaction was placed in
              the relay log queue by this I/O thread.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       LAST_QUEUED_TRANSACTION_END_QUEUE_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the last transaction was queued to
              the relay log files.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       QUEUEING_TRANSACTION
      </code>
     </p>
     <p>
      The global transaction ID (GTID) of the currently queueing
              transaction in the relay log.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       QUEUEING_TRANSACTION_ORIGINAL_COMMIT_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the currently queueing transaction
              was committed on the original source.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       QUEUEING_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the currently queueing transaction
              was committed on the immediate source.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       QUEUEING_TRANSACTION_START_QUEUE_TIMESTAMP
      </code>
     </p>
     <p>
      A timestamp in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         YYYY-MM-DD
              hh:mm:ss
        </code>
       </em>
       [.
       <em class="replaceable">
        <code>
         fraction
        </code>
       </em>
       ]'
      </code>
      format that shows when the first event of the currently
              queueing transaction was written to the relay log by this
              I/O thread.
     </p>
    </li>
   </ul>
  </div>
  <p>
   When the Performance Schema is disabled, local timing
          information is not collected, so the fields showing the start
          and end timestamps for queued transactions are zero.
  </p>
  <p>
   The
   <a class="link" href="performance-schema-replication-connection-status-table.html" title="29.12.11.13 The replication_connection_status Table">
    <code class="literal">
     replication_connection_status
    </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">
       CHANNEL_NAME
      </code>
      )
     </p>
    </li>
    <li class="listitem">
     <p>
      Index on (
      <code class="literal">
       THREAD_ID
      </code>
      )
     </p>
    </li>
   </ul>
  </div>
  <p>
   The following table shows the correspondence between
   <a class="link" href="performance-schema-replication-connection-status-table.html" title="29.12.11.13 The replication_connection_status Table">
    <code class="literal">
     replication_connection_status
    </code>
   </a>
   columns and
   <a class="link" href="show-replica-status.html" title="15.7.7.35 SHOW REPLICA STATUS Statement">
    <code class="literal">
     SHOW
          REPLICA STATUS
    </code>
   </a>
   columns.
  </p>
  <div class="informaltable">
   <table summary="Correspondence between replication_connection_status columns and SHOW REPLICA STATUS columns">
    <colgroup>
     <col style="width: 60%"/>
     <col style="width: 40%"/>
    </colgroup>
    <thead>
     <tr>
      <th>
       <code class="literal">
        replication_connection_status
       </code>
       Column
      </th>
      <th>
       <code class="literal">
        SHOW REPLICA STATUS
       </code>
       Column
      </th>
     </tr>
    </thead>
    <tbody>
     <tr>
      <td>
       <code class="literal">
        SOURCE_UUID
       </code>
      </td>
      <td>
       <code class="literal">
        Master_UUID
       </code>
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        THREAD_ID
       </code>
      </td>
      <td>
       None
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        SERVICE_STATE
       </code>
      </td>
      <td>
       <code class="literal">
        Replica_IO_Running
       </code>
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        RECEIVED_TRANSACTION_SET
       </code>
      </td>
      <td>
       <code class="literal">
        Retrieved_Gtid_Set
       </code>
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        LAST_ERROR_NUMBER
       </code>
      </td>
      <td>
       <code class="literal">
        Last_IO_Errno
       </code>
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        LAST_ERROR_MESSAGE
       </code>
      </td>
      <td>
       <code class="literal">
        Last_IO_Error
       </code>
      </td>
     </tr>
     <tr>
      <td>
       <code class="literal">
        LAST_ERROR_TIMESTAMP
       </code>
      </td>
      <td>
       <code class="literal">
        Last_IO_Error_Timestamp
       </code>
      </td>
     </tr>
    </tbody>
   </table>
  </div>
 </div>
 <br/>
</div>
