<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="group-replication-functions-for-communication-protocol">
      </a>
      14.18.1.4 Functions to Inspect and Set the Group Replication Communication
Protocol Version
     </h4>
    </div>
   </div>
  </div>
  <p>
   The following functions enable you to inspect and configure
          the Group Replication communication protocol version that is
          used by a replication group.
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="xref" href="group-replication-message-compression.html" title="20.7.4 Message Compression">
       Section 20.7.4, “Message Compression”
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="group-replication-performance-message-fragmentation.html" title="20.7.5 Message Fragmentation">
       Section 20.7.5, “Message Fragmentation”
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="group-replication-single-consensus-leader.html" title="20.7.3 Single Consensus Leader">
       Section 20.7.3, “Single Consensus Leader”
      </a>
     </p>
    </li>
   </ul>
  </div>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a name="function_group-replication-get-communication-protocol">
      </a>
      <a class="link" href="group-replication-functions-for-communication-protocol.html#function_group-replication-get-communication-protocol">
       <code class="literal">
        group_replication_get_communication_protocol()
       </code>
      </a>
     </p>
     <a class="indexterm" name="idm46045193806336">
     </a>
     <a class="indexterm" name="idm46045193805232">
     </a>
     <p>
      Inspect the Group Replication communication protocol
              version that is currently in use for a group.
     </p>
     <p>
      Syntax:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-clike"><div class="docs-select-all right" id="sa80884479"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-clike">STRING <span class="token function">group_replication_get_communication_protocol</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code></pre>
     </div>
     <p>
      This function has no parameters.
     </p>
     <p>
      Return value:
     </p>
     <p>
      The oldest MySQL Server version that can join this group
              and use the group's communication protocol. Note that
              the
      <a class="link" href="group-replication-functions-for-communication-protocol.html#function_group-replication-get-communication-protocol">
       <code class="literal">
        group_replication_get_communication_protocol()
       </code>
      </a>
      function returns the minimum MySQL version that the group
              supports, which might differ from the version number that
              was passed to
      <a class="link" href="group-replication-functions-for-communication-protocol.html#function_group-replication-set-communication-protocol">
       <code class="literal">
        group_replication_set_communication_protocol()
       </code>
      </a>
      ,
              and from the MySQL Server version that is installed on the
              member where you use the function.
     </p>
     <p>
      If the protocol cannot be inspected because this server
              instance does not belong to a replication group, an error
              is returned as a string.
     </p>
     <p>
      Example:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa13525648"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> group_replication_get_communication_protocol<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> group_replication_get_communication_protocol() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 8.4.3                                          <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
     </div>
     <p>
      For more information, see
      <a class="xref" href="group-replication-communication-protocol.html" title="20.5.1.4 Setting a Group's Communication Protocol Version">
       Section 20.5.1.4, “Setting a Group's Communication Protocol Version”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="function_group-replication-set-communication-protocol">
      </a>
      <a class="link" href="group-replication-functions-for-communication-protocol.html#function_group-replication-set-communication-protocol">
       <code class="literal">
        group_replication_set_communication_protocol()
       </code>
      </a>
     </p>
     <a class="indexterm" name="idm46045193790576">
     </a>
     <a class="indexterm" name="idm46045193789472">
     </a>
     <p>
      Downgrade the Group Replication communication protocol
              version of a group so that members at earlier releases can
              join, or upgrade the Group Replication communication
              protocol version of a group after upgrading MySQL Server
              on all members. The
      <a class="link" href="privileges-provided.html#priv_group-replication-admin">
       <code class="literal">
        GROUP_REPLICATION_ADMIN
       </code>
      </a>
      privilege is required to use this function, and all
              existing group members must be online when you issue the
              statement, with no loss of majority.
     </p>
     <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Note
      </div>
      <p>
       For MySQL InnoDB cluster, the communication protocol
                version is managed automatically whenever the cluster
                topology is changed using AdminAPI operations. You do
                not have to use these functions yourself for an InnoDB
                cluster.
      </p>
     </div>
     <p>
      Syntax:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-clike"><div class="docs-select-all right" id="sa88979436"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-clike">STRING <span class="token function">group_replication_set_communication_protocol</span><span class="token punctuation">(</span><em class="replaceable">version</em><span class="token punctuation">)</span></code></pre>
     </div>
     <p>
      Arguments:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         <em class="replaceable">
          <code>
           version
          </code>
         </em>
         : For a downgrade,
                  specify the MySQL Server version of the prospective
                  group member that has the oldest installed server
                  version. In this case, the command makes the group
                  fall back to a communication protocol compatible with
                  that server version if possible. The minimum server
                  version that you can specify is MySQL 5.7.14. For an
                  upgrade, specify the new MySQL Server version to which
                  the existing group members have been upgraded.
        </p>
       </li>
      </ul>
     </div>
     <p>
      Return value:
     </p>
     <p>
      A string containing the result of the operation, for
              example whether it was successful or not.
     </p>
     <p>
      Example:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa38721772"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> group_replication_set_communication_protocol<span class="token punctuation">(</span><span class="token string">"5.7.25"</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
     </div>
     <p>
      For more information, see
      <a class="xref" href="group-replication-communication-protocol.html" title="20.5.1.4 Setting a Group's Communication Protocol Version">
       Section 20.5.1.4, “Setting a Group's Communication Protocol Version”
      </a>
      .
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
