<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="group-replication-functions-for-mode">
      </a>
      14.18.1.2 Functions which Configure the Group Replication Mode
     </h4>
    </div>
   </div>
  </div>
  <p>
   The following functions enable you to control the mode which a
          replication group is running in, either single-primary or
          multi-primary mode.
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a name="function_group-replication-switch-to-multi-primary-mode">
      </a>
      <a class="link" href="group-replication-functions-for-mode.html#function_group-replication-switch-to-multi-primary-mode">
       <code class="literal">
        group_replication_switch_to_multi_primary_mode()
       </code>
      </a>
     </p>
     <a class="indexterm" name="idm46045193870864">
     </a>
     <a class="indexterm" name="idm46045193869744">
     </a>
     <p>
      Changes a group running in single-primary mode to
              multi-primary mode. Must be issued on a member of a
              replication group running in single-primary mode.
     </p>
     <p>
      Syntax:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-clike"><div class="docs-select-all right" id="sa66967576"><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_switch_to_multi_primary_mode</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>
      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="sa44833871"><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_switch_to_multi_primary_mode<span class="token punctuation">(</span><span class="token punctuation">)</span></code></pre>
     </div>
     <p>
      All members which belong to the group become primaries.
     </p>
     <p>
      For more information, see
      <a class="xref" href="group-replication-changing-group-mode.html" title="20.5.1.2 Changing the Group Mode">
       Section 20.5.1.2, “Changing the Group Mode”
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a name="function_group-replication-switch-to-single-primary-mode">
      </a>
      <a class="link" href="group-replication-functions-for-mode.html#function_group-replication-switch-to-single-primary-mode">
       <code class="literal">
        group_replication_switch_to_single_primary_mode()
       </code>
      </a>
     </p>
     <a class="indexterm" name="idm46045193858880">
     </a>
     <a class="indexterm" name="idm46045193857840">
     </a>
     <p>
      Changes a group running in multi-primary mode to
              single-primary mode, without the need to stop Group
              Replication. Must be issued on a member of a replication
              group running in multi-primary mode. When you change to
              single-primary mode, strict consistency checks are also
              disabled on all group members, as required in
              single-primary mode
              (
      <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_enforce_update_everywhere_checks">
       <code class="literal">
        group_replication_enforce_update_everywhere_checks=OFF
       </code>
      </a>
      ).
     </p>
     <p>
      Syntax:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-clike"><div class="docs-select-all right" id="sa30130918"><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_switch_to_single_primary_mode</span><span class="token punctuation">(</span><span class="token punctuation">[</span><em class="replaceable">str</em><span class="token punctuation">]</span><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>
           str
          </code>
         </em>
         : A string containing
                  the UUID of a member of the group which should become
                  the new single primary. Other members of the group
                  become secondaries.
        </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="sa41478722"><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_switch_to_single_primary_mode<span class="token punctuation">(</span><em class="replaceable">member_uuid</em><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
     </div>
     <p>
      For more information, see
      <a class="xref" href="group-replication-changing-group-mode.html" title="20.5.1.2 Changing the Group Mode">
       Section 20.5.1.2, “Changing the Group Mode”
      </a>
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
