<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="replication-options-source">
      </a>
      19.1.6.2 Replication Source Options and Variables
     </h4>
    </div>
   </div>
  </div>
  <p>
   This section describes the server options and system variables
      that you can use on replication source servers. You can specify
      the options either on the
   <a class="link" href="command-line-options.html" title="6.2.2.1 Using Options on the Command Line">
    command line
   </a>
   or in an
   <a class="link" href="option-files.html" title="6.2.2.2 Using Option Files">
    option file
   </a>
   . You can specify
      system variable values using
   <a class="link" href="set-variable.html" title="15.7.6.1 SET Syntax for Variable Assignment">
    <code class="literal">
     SET
    </code>
   </a>
   .
  </p>
  <p>
   On the source and each replica, you must set the
   <a class="link" href="replication-options.html#sysvar_server_id">
    <code class="literal">
     server_id
    </code>
   </a>
   system variable to
      establish a unique replication ID. For each server, you should
      pick a unique positive integer in the range from 1 to
      2
   <sup>
    32
   </sup>
   − 1, and each ID must be
      different from every other ID in use by any other source or
      replica in the replication topology. Example:
   <code class="literal">
    server-id=3
   </code>
   .
  </p>
  <p>
   For options used on the source for controlling binary logging, see
   <a class="xref" href="replication-options-binary-log.html" title="19.1.6.4 Binary Logging Options and Variables">
    Section 19.1.6.4, “Binary Logging Options and Variables”
   </a>
   .
  </p>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h5 class="title">
       <a name="replication-optvars-masters">
       </a>
       Startup Options for Replication Source Servers
      </h5>
     </div>
    </div>
   </div>
   <p>
    The following list describes startup options for controlling
        replication source servers. Replication-related system variables
        are discussed later in this section.
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <a name="option_mysqld_show-replica-auth-info">
       </a>
       <a class="link" href="replication-options-source.html#option_mysqld_show-replica-auth-info">
        <code class="option">
         --show-replica-auth-info
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144569168">
      </a>
      <a class="indexterm" name="idm46045144567664">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for show-replica-auth-info">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --show-replica-auth-info[={OFF|ON}]
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Boolean
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            OFF
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       Use
       <a class="link" href="replication-options-source.html#option_mysqld_show-replica-auth-info">
        <code class="option">
         --show-replica-auth-info
        </code>
       </a>
       ,
            which displays replication user names and passwords in the
            output of
       <a class="link" href="show-replicas.html" title="15.7.7.36 SHOW REPLICAS Statement">
        <code class="literal">
         SHOW REPLICAS
        </code>
       </a>
       on
            the source for replicas started with the
       <a class="link" href="replication-options-replica.html#sysvar_report_user">
        <code class="option">
         --report-user
        </code>
       </a>
       and
       <a class="link" href="replication-options-replica.html#sysvar_report_password">
        <code class="option">
         --report-password
        </code>
       </a>
       options.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_mysqld_show-slave-auth-info">
       </a>
       <a class="link" href="replication-options-source.html#option_mysqld_show-slave-auth-info">
        <code class="option">
         --show-slave-auth-info
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144549280">
      </a>
      <a class="indexterm" name="idm46045144547824">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for show-slave-auth-info">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --show-slave-auth-info[={OFF|ON}]
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Deprecated
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Boolean
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            OFF
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       Deprecated alias for
       <a class="link" href="replication-options-source.html#option_mysqld_show-replica-auth-info">
        <code class="option">
         --show-replica-auth-info
        </code>
       </a>
       .
      </p>
     </li>
    </ul>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h5 class="title">
       <a name="replication-sysvars-masters">
       </a>
       System Variables Used on Replication Source Servers
      </h5>
     </div>
    </div>
   </div>
   <p>
    The following system variables are used for or by replication
        source servers:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <a name="sysvar_auto_increment_increment">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
        <code class="literal">
         auto_increment_increment
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144528208">
      </a>
      <a class="indexterm" name="idm46045144527104">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for auto_increment_increment">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --auto-increment-increment=#
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
             auto_increment_increment
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global, Session
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Integer
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            1
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Minimum Value
          </th>
          <td>
           <code class="literal">
            1
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Maximum Value
          </th>
          <td>
           <code class="literal">
            65535
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
        <code class="literal">
         auto_increment_increment
        </code>
       </a>
       and
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
        <code class="literal">
         auto_increment_offset
        </code>
       </a>
       are intended for use with circular (source-to-source)
            replication, and can be used to control the operation of
       <code class="literal">
        AUTO_INCREMENT
       </code>
       columns. Both variables
            have global and session values, and each can assume an
            integer value between 1 and 65,535 inclusive. Setting the
            value of either of these two variables to 0 causes its value
            to be set to 1 instead. Attempting to set the value of
            either of these two variables to an integer greater than
            65,535 or less than 0 causes its value to be set to 65,535
            instead. Attempting to set the value of
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
        <code class="literal">
         auto_increment_increment
        </code>
       </a>
       or
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
        <code class="literal">
         auto_increment_offset
        </code>
       </a>
       to a
            noninteger value produces an error, and the actual value of
            the variable remains unchanged.
      </p>
      <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
       <div class="admon-title">
        Note
       </div>
       <p>
        <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
         <code class="literal">
          auto_increment_increment
         </code>
        </a>
        is also supported for use with
        <a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
         <code class="literal">
          NDB
         </code>
        </a>
        tables.
       </p>
      </div>
      <p>
       When Group Replication is started on a server, the value of
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
        <code class="literal">
         auto_increment_increment
        </code>
       </a>
       is
            changed to the value of
       <a class="link" href="group-replication-system-variables.html#sysvar_group_replication_auto_increment_increment">
        <code class="literal">
         group_replication_auto_increment_increment
        </code>
       </a>
       ,
            which defaults to 7, and the value of
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
        <code class="literal">
         auto_increment_offset
        </code>
       </a>
       is
            changed to the server ID. The changes are reverted when
            Group Replication is stopped. These changes are only made
            and reverted if
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
        <code class="literal">
         auto_increment_increment
        </code>
       </a>
       and
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
        <code class="literal">
         auto_increment_offset
        </code>
       </a>
       each have their default value of 1. If their values have
            already been modified from the default, Group Replication
            does not alter them. These system variables are also not
            modified when Group Replication is in single-primary mode,
            where only one server writes.
      </p>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
        <code class="literal">
         auto_increment_increment
        </code>
       </a>
       and
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
        <code class="literal">
         auto_increment_offset
        </code>
       </a>
       affect
       <code class="literal">
        AUTO_INCREMENT
       </code>
       column behavior as
            follows:
      </p>
      <div class="itemizedlist">
       <ul class="itemizedlist" style="list-style-type: circle; ">
        <li class="listitem">
         <p>
          <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
           <code class="literal">
            auto_increment_increment
           </code>
          </a>
          controls the interval between successive column values.
                For example:
         </p>
         <div class="copytoclipboard-wrapper">
          <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa12559337"><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 prompt">mysql&gt;</span> <span class="token keyword">SHOW</span> <span class="token keyword">VARIABLES</span> <span class="token operator">LIKE</span> <span class="token string">'auto_inc%'</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>
<span class="token output"><span class="token punctuation">|</span> Variable_name            <span class="token punctuation">|</span> Value <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>
<span class="token output"><span class="token punctuation">|</span> auto_increment_increment <span class="token punctuation">|</span> 1     <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> auto_increment_offset    <span class="token punctuation">|</span> 1     <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>
<span class="token output">2 rows in set (0.00 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> autoinc1
<span class="token prompt">    -&gt;</span> <span class="token punctuation">(</span>col <span class="token datatype">INT</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span> <span class="token keyword">AUTO_INCREMENT</span> <span class="token keyword">PRIMARY</span> <span class="token keyword">KEY</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">Query</span> OK<span class="token punctuation">,</span> <span class="token number">0</span> <span class="token keyword">rows</span> affected <span class="token punctuation">(</span><span class="token number">0.04</span> sec<span class="token punctuation">)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">SET</span> <span class="token variable">@@auto_increment_increment</span><span class="token operator">=</span><span class="token number">10</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.00 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">SHOW</span> <span class="token keyword">VARIABLES</span> <span class="token operator">LIKE</span> <span class="token string">'auto_inc%'</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>
<span class="token output"><span class="token punctuation">|</span> Variable_name            <span class="token punctuation">|</span> Value <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>
<span class="token output"><span class="token punctuation">|</span> auto_increment_increment <span class="token punctuation">|</span> 10    <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> auto_increment_offset    <span class="token punctuation">|</span> 1     <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>
<span class="token output">2 rows in set (0.01 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">INSERT</span> <span class="token keyword">INTO</span> autoinc1 <span class="token keyword">VALUES</span> <span class="token punctuation">(</span><span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 4 rows affected (0.00 sec)</span>
<span class="token output">Records: 4  Duplicates: 0  Warnings: 0</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> col <span class="token keyword">FROM</span> autoinc1<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>
<span class="token output"><span class="token punctuation">|</span> col <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>
<span class="token output"><span class="token punctuation">|</span>   1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  11 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  21 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  31 <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>
<span class="token output">4 rows in set (0.00 sec)</span></code></pre>
         </div>
        </li>
        <li class="listitem">
         <p>
          <a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
           <code class="literal">
            auto_increment_offset
           </code>
          </a>
          determines the starting point for the
          <code class="literal">
           AUTO_INCREMENT
          </code>
          column value. Consider
                the following, assuming that these statements are
                executed during the same session as the example given in
                the description for
          <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
           <code class="literal">
            auto_increment_increment
           </code>
          </a>
          :
         </p>
         <div class="copytoclipboard-wrapper">
          <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa65560444"><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 prompt">mysql&gt;</span> <span class="token keyword">SET</span> <span class="token variable">@@auto_increment_offset</span><span class="token operator">=</span><span class="token number">5</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.00 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">SHOW</span> <span class="token keyword">VARIABLES</span> <span class="token operator">LIKE</span> <span class="token string">'auto_inc%'</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>
<span class="token output"><span class="token punctuation">|</span> Variable_name            <span class="token punctuation">|</span> Value <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>
<span class="token output"><span class="token punctuation">|</span> auto_increment_increment <span class="token punctuation">|</span> 10    <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> auto_increment_offset    <span class="token punctuation">|</span> 5     <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>
<span class="token output">2 rows in set (0.00 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> autoinc2
<span class="token prompt">    -&gt;</span> <span class="token punctuation">(</span>col <span class="token datatype">INT</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span> <span class="token keyword">AUTO_INCREMENT</span> <span class="token keyword">PRIMARY</span> <span class="token keyword">KEY</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.06 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">INSERT</span> <span class="token keyword">INTO</span> autoinc2 <span class="token keyword">VALUES</span> <span class="token punctuation">(</span><span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 4 rows affected (0.00 sec)</span>
<span class="token output">Records: 4  Duplicates: 0  Warnings: 0</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> col <span class="token keyword">FROM</span> autoinc2<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>
<span class="token output"><span class="token punctuation">|</span> col <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>
<span class="token output"><span class="token punctuation">|</span>   5 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  15 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  25 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  35 <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>
<span class="token output">4 rows in set (0.02 sec)</span></code></pre>
         </div>
         <p>
          When the value of
          <a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
           <code class="literal">
            auto_increment_offset
           </code>
          </a>
          is greater than that of
          <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
           <code class="literal">
            auto_increment_increment
           </code>
          </a>
          ,
                the value of
          <a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
           <code class="literal">
            auto_increment_offset
           </code>
          </a>
          is ignored.
         </p>
        </li>
       </ul>
      </div>
      <p>
       If either of these variables is changed, and then new rows
            inserted into a table containing an
       <code class="literal">
        AUTO_INCREMENT
       </code>
       column, the results may
            seem counterintuitive because the series of
       <code class="literal">
        AUTO_INCREMENT
       </code>
       values is calculated
            without regard to any values already present in the column,
            and the next value inserted is the least value in the series
            that is greater than the maximum existing value in the
       <code class="literal">
        AUTO_INCREMENT
       </code>
       column. The series is
            calculated like this:
      </p>
      <p>
       <code class="literal">
        auto_increment_offset
       </code>
       +
       <em class="replaceable">
        <code>
         N
        </code>
       </em>
       ×
       <code class="literal">
        auto_increment_increment
       </code>
      </p>
      <p>
       where
       <em class="replaceable">
        <code>
         N
        </code>
       </em>
       is a positive integer
            value in the series [1, 2, 3, ...]. For example:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa24423883"><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 prompt">mysql&gt;</span> <span class="token keyword">SHOW</span> <span class="token keyword">VARIABLES</span> <span class="token operator">LIKE</span> <span class="token string">'auto_inc%'</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>
<span class="token output"><span class="token punctuation">|</span> Variable_name            <span class="token punctuation">|</span> Value <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>
<span class="token output"><span class="token punctuation">|</span> auto_increment_increment <span class="token punctuation">|</span> 10    <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> auto_increment_offset    <span class="token punctuation">|</span> 5     <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>
<span class="token output">2 rows in set (0.00 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> col <span class="token keyword">FROM</span> autoinc1<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>
<span class="token output"><span class="token punctuation">|</span> col <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>
<span class="token output"><span class="token punctuation">|</span>   1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  11 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  21 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  31 <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>
<span class="token output">4 rows in set (0.00 sec)</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">INSERT</span> <span class="token keyword">INTO</span> autoinc1 <span class="token keyword">VALUES</span> <span class="token punctuation">(</span><span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token boolean">NULL</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 4 rows affected (0.00 sec)</span>
<span class="token output">Records: 4  Duplicates: 0  Warnings: 0</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> col <span class="token keyword">FROM</span> autoinc1<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>
<span class="token output"><span class="token punctuation">|</span> col <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>
<span class="token output"><span class="token punctuation">|</span>   1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  11 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  21 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  31 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  35 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  45 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  55 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>  65 <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>
<span class="token output">8 rows in set (0.00 sec)</span></code></pre>
      </div>
      <p>
       The values shown for
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
        <code class="literal">
         auto_increment_increment
        </code>
       </a>
       and
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
        <code class="literal">
         auto_increment_offset
        </code>
       </a>
       generate the series 5 +
       <em class="replaceable">
        <code>
         N
        </code>
       </em>
       ×
            10, that is, [5, 15, 25, 35, 45, ...]. The highest value
            present in the
       <code class="literal">
        col
       </code>
       column prior to the
       <a class="link" href="insert.html" title="15.2.7 INSERT Statement">
        <code class="literal">
         INSERT
        </code>
       </a>
       is 31, and the next
            available value in the
       <code class="literal">
        AUTO_INCREMENT
       </code>
       series is 35, so the inserted values for
       <code class="literal">
        col
       </code>
       begin at that point and the results
            are as shown for the
       <a class="link" href="select.html" title="15.2.13 SELECT Statement">
        <code class="literal">
         SELECT
        </code>
       </a>
       query.
      </p>
      <p>
       It is not possible to restrict the effects of these two
            variables to a single table; these variables control the
            behavior of all
       <code class="literal">
        AUTO_INCREMENT
       </code>
       columns in
       <span class="emphasis">
        <em>
         all
        </em>
       </span>
       tables on the MySQL server. If the
            global value of either variable is set, its effects persist
            until the global value is changed or overridden by setting
            the session value, or until
       <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
        <span class="command">
         <strong>
          mysqld
         </strong>
        </span>
       </a>
       is
            restarted. If the local value is set, the new value affects
       <code class="literal">
        AUTO_INCREMENT
       </code>
       columns for all tables
            into which new rows are inserted by the current user for the
            duration of the session, unless the values are changed
            during that session.
      </p>
      <p>
       The default value of
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
        <code class="literal">
         auto_increment_increment
        </code>
       </a>
       is
            1. See
       <a class="xref" href="replication-features-auto-increment.html" title="19.5.1.1 Replication and AUTO_INCREMENT">
        Section 19.5.1.1, “Replication and AUTO_INCREMENT”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_auto_increment_offset">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
        <code class="literal">
         auto_increment_offset
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144425840">
      </a>
      <a class="indexterm" name="idm46045144424800">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for auto_increment_offset">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --auto-increment-offset=#
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
             auto_increment_offset
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global, Session
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Integer
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            1
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Minimum Value
          </th>
          <td>
           <code class="literal">
            1
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Maximum Value
          </th>
          <td>
           <code class="literal">
            65535
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       This variable has a default value of 1. If it is left with
            its default value, and Group Replication is started on the
            server in multi-primary mode, it is changed to the server
            ID. For more information, see the description for
       <a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
        <code class="literal">
         auto_increment_increment
        </code>
       </a>
       .
      </p>
      <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
       <div class="admon-title">
        Note
       </div>
       <p>
        <code class="literal">
         auto_increment_offset
        </code>
        is also supported
              for use with
        <a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
         <code class="literal">
          NDB
         </code>
        </a>
        tables.
       </p>
      </div>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_immediate_server_version">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_immediate_server_version">
        <code class="literal">
         immediate_server_version
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144391200">
      </a>
      <a class="indexterm" name="idm46045144390096">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for immediate_server_version">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_immediate_server_version">
             immediate_server_version
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Session
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Integer
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            999999
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Minimum Value
          </th>
          <td>
           <code class="literal">
            0
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Maximum Value
          </th>
          <td>
           <code class="literal">
            999999
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       For internal use by replication. This session system
            variable holds the MySQL Server release number of the server
            that is the immediate source in a replication topology (for
            example,
       <code class="literal">
        80403
       </code>
       for a
            MySQL 8.4.4 server instance). If this
            immediate server is at a release that does not support the
            session system variable, the value of the variable is set to
            0 (
       <code class="literal">
        UNKNOWN_SERVER_VERSION
       </code>
       ).
      </p>
      <p>
       The value of the variable is replicated from a source to a
            replica. With this information the replica can correctly
            process data originating from a source at an older release,
            by recognizing where syntax changes or semantic changes have
            occurred between the releases involved and handling these
            appropriately. The information can also be used in a Group
            Replication environment where one or more members of the
            replication group is at a newer release than the others. The
            value of the variable can be viewed in the binary log for
            each transaction (as part of the
       <code class="literal">
        Gtid_log_event
       </code>
       , or
       <code class="literal">
        Anonymous_gtid_log_event
       </code>
       if GTIDs are not
            in use on the server), and could be helpful in debugging
            cross-version replication issues.
      </p>
      <p>
       Setting the session value of this system variable is a
            restricted operation. The session user must have either the
       <a class="link" href="privileges-provided.html#priv_replication-applier">
        <code class="literal">
         REPLICATION_APPLIER
        </code>
       </a>
       privilege
            (see
       <a class="xref" href="replication-privilege-checks.html" title="19.3.3 Replication Privilege Checks">
        Section 19.3.3, “Replication Privilege Checks”
       </a>
       ), or
            privileges sufficient to set restricted session variables
            (see
       <a class="xref" href="system-variable-privileges.html" title="7.1.9.1 System Variable Privileges">
        Section 7.1.9.1, “System Variable Privileges”
       </a>
       ). However,
            note that the variable is not intended for users to set; it
            is set automatically by the replication infrastructure.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_original_server_version">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_original_server_version">
        <code class="literal">
         original_server_version
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144355760">
      </a>
      <a class="indexterm" name="idm46045144354720">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for original_server_version">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_original_server_version">
             original_server_version
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Session
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Integer
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            999999
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Minimum Value
          </th>
          <td>
           <code class="literal">
            0
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Maximum Value
          </th>
          <td>
           <code class="literal">
            999999
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       For internal use by replication. This session system
            variable holds the MySQL Server release number of the server
            where a transaction was originally committed (for example,
       <code class="literal">
        80403
       </code>
       for a MySQL
            8.4.3 server instance). If this original server
            is at a release that does not support the session system
            variable, the value of the variable is set to 0
            (
       <code class="literal">
        UNKNOWN_SERVER_VERSION
       </code>
       ). Note that when
            a release number is set by the original server, the value of
            the variable is reset to 0 if the immediate server or any
            other intervening server in the replication topology does
            not support the session system variable, and so does not
            replicate its value.
      </p>
      <p>
       The value of the variable is set and used in the same ways
            as for the
       <a class="link" href="replication-options-source.html#sysvar_immediate_server_version">
        <code class="literal">
         immediate_server_version
        </code>
       </a>
       system variable. If the value of the variable is the same as
            that for the
       <a class="link" href="replication-options-source.html#sysvar_immediate_server_version">
        <code class="literal">
         immediate_server_version
        </code>
       </a>
       system variable, only the latter is recorded in the binary
            log, with an indicator that the original server version is
            the same.
      </p>
      <p>
       In a Group Replication environment, view change log events,
            which are special transactions queued by each group member
            when a new member joins the group, are tagged with the
            server version of the group member queuing the transaction.
            This ensures that the server version of the original donor
            is known to the joining member. Because the view change log
            events queued for a particular view change have the same
            GTID on all members, for this case only, instances of the
            same GTID might have a different original server version.
      </p>
      <p>
       Setting the session value of this system variable is a
            restricted operation. The session user must have either the
       <a class="link" href="privileges-provided.html#priv_replication-applier">
        <code class="literal">
         REPLICATION_APPLIER
        </code>
       </a>
       privilege
            (see
       <a class="xref" href="replication-privilege-checks.html" title="19.3.3 Replication Privilege Checks">
        Section 19.3.3, “Replication Privilege Checks”
       </a>
       ), or
            privileges sufficient to set restricted session variables
            (see
       <a class="xref" href="system-variable-privileges.html" title="7.1.9.1 System Variable Privileges">
        Section 7.1.9.1, “System Variable Privileges”
       </a>
       ). However,
            note that the variable is not intended for users to set; it
            is set automatically by the replication infrastructure.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_rpl_semi_sync_master_enabled">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_enabled">
        <code class="literal">
         rpl_semi_sync_master_enabled
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144317824">
      </a>
      <a class="indexterm" name="idm46045144316720">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for rpl_semi_sync_master_enabled">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --rpl-semi-sync-master-enabled[={OFF|ON}]
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_enabled">
             rpl_semi_sync_master_enabled
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Boolean
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            OFF
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       Deprecated synonym for
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_enabled">
        <code class="literal">
         rpl_semi_sync_source_enabled
        </code>
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_rpl_semi_sync_master_timeout">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_timeout">
        <code class="literal">
         rpl_semi_sync_master_timeout
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144290880">
      </a>
      <a class="indexterm" name="idm46045144289776">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for rpl_semi_sync_master_timeout">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --rpl-semi-sync-master-timeout=#
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_timeout">
             rpl_semi_sync_master_timeout
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Integer
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            10000
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Minimum Value
          </th>
          <td>
           <code class="literal">
            0
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Maximum Value
          </th>
          <td>
           <code class="literal">
            4294967295
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Unit
          </th>
          <td>
           milliseconds
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       Deprecated synonym for
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_timeout">
        <code class="literal">
         rpl_semi_sync_source_timeout
        </code>
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_rpl_semi_sync_master_trace_level">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_trace_level">
        <code class="literal">
         rpl_semi_sync_master_trace_level
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144257008">
      </a>
      <a class="indexterm" name="idm46045144255904">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for rpl_semi_sync_master_trace_level">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --rpl-semi-sync-master-trace-level=#
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_trace_level">
             rpl_semi_sync_master_trace_level
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Integer
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            32
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Minimum Value
          </th>
          <td>
           <code class="literal">
            0
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Maximum Value
          </th>
          <td>
           <code class="literal">
            4294967295
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       Deprecated synonym for
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_trace_level">
        <code class="literal">
         rpl_semi_sync_source_trace_level
        </code>
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_rpl_semi_sync_master_wait_for_slave_count">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_wait_for_slave_count">
        <code class="literal">
         rpl_semi_sync_master_wait_for_slave_count
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144225136">
      </a>
      <a class="indexterm" name="idm46045144224016">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for rpl_semi_sync_master_wait_for_slave_count">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --rpl-semi-sync-master-wait-for-slave-count=#
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_wait_for_slave_count">
             rpl_semi_sync_master_wait_for_slave_count
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Integer
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            1
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Minimum Value
          </th>
          <td>
           <code class="literal">
            1
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Maximum Value
          </th>
          <td>
           <code class="literal">
            65535
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       Deprecated synonym for
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_for_replica_count">
        <code class="literal">
         rpl_semi_sync_source_wait_for_replica_count
        </code>
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_rpl_semi_sync_master_wait_no_slave">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_wait_no_slave">
        <code class="literal">
         rpl_semi_sync_master_wait_no_slave
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144193056">
      </a>
      <a class="indexterm" name="idm46045144192016">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for rpl_semi_sync_master_wait_no_slave">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --rpl-semi-sync-master-wait-no-slave[={OFF|ON}]
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_wait_no_slave">
             rpl_semi_sync_master_wait_no_slave
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Boolean
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            ON
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       Deprecated synonym for
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_no_replica">
        <code class="literal">
         rpl_semi_sync_source_wait_no_replica
        </code>
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_rpl_semi_sync_master_wait_point">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_wait_point">
        <code class="literal">
         rpl_semi_sync_master_wait_point
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144166112">
      </a>
      <a class="indexterm" name="idm46045144165008">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for rpl_semi_sync_master_wait_point">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --rpl-semi-sync-master-wait-point=value
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_wait_point">
             rpl_semi_sync_master_wait_point
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Enumeration
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            AFTER_SYNC
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Valid Values
          </th>
          <td>
           <p class="valid-value">
            <code class="literal">
             AFTER_SYNC
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             AFTER_COMMIT
            </code>
           </p>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       Deprecated synonym for
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_point">
        <code class="literal">
         rpl_semi_sync_source_wait_point
        </code>
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_rpl_semi_sync_source_enabled">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_enabled">
        <code class="literal">
         rpl_semi_sync_source_enabled
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144135344">
      </a>
      <a class="indexterm" name="idm46045144134240">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for rpl_semi_sync_source_enabled">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --rpl-semi-sync-source-enabled[={OFF|ON}]
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_enabled">
             rpl_semi_sync_source_enabled
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Boolean
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            OFF
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_enabled">
        <code class="literal">
         rpl_semi_sync_source_enabled
        </code>
       </a>
       is available when the
       <code class="literal">
        rpl_semi_sync_source
       </code>
       (
       <code class="literal">
        semisync_source.so
       </code>
       library) plugin was
            installed on the replica to set up semisynchronous
            replication.
      </p>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_enabled">
        <code class="literal">
         rpl_semi_sync_source_enabled
        </code>
       </a>
       controls whether semisynchronous replication is enabled on
            the source server. To enable or disable the plugin, set this
            variable to
       <code class="literal">
        ON
       </code>
       or
       <code class="literal">
        OFF
       </code>
       (or 1 or 0), respectively. The default is
       <code class="literal">
        OFF
       </code>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_rpl_semi_sync_source_timeout">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_timeout">
        <code class="literal">
         rpl_semi_sync_source_timeout
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144102960">
      </a>
      <a class="indexterm" name="idm46045144101856">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for rpl_semi_sync_source_timeout">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --rpl-semi-sync-source-timeout=#
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_timeout">
             rpl_semi_sync_source_timeout
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Integer
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            10000
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Minimum Value
          </th>
          <td>
           <code class="literal">
            0
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Maximum Value
          </th>
          <td>
           <code class="literal">
            4294967295
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Unit
          </th>
          <td>
           milliseconds
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_timeout">
        <code class="literal">
         rpl_semi_sync_source_timeout
        </code>
       </a>
       is available when the
       <code class="literal">
        rpl_semi_sync_source
       </code>
       (
       <code class="filename">
        semisync_source.so
       </code>
       library) plugin is
            installed on the replica.
      </p>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_timeout">
        <code class="literal">
         rpl_semi_sync_source_timeout
        </code>
       </a>
       controls how long the source waits on a commit for
            acknowledgment from a replica before timing out and
            reverting to asynchronous replication. The value is
            specified in milliseconds, and the default value is 10000
            (10 seconds).
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_rpl_semi_sync_source_trace_level">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_trace_level">
        <code class="literal">
         rpl_semi_sync_source_trace_level
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144065616">
      </a>
      <a class="indexterm" name="idm46045144064512">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for rpl_semi_sync_source_trace_level">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --rpl-semi-sync-source-trace-level=#
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_trace_level">
             rpl_semi_sync_source_trace_level
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Integer
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            32
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Minimum Value
          </th>
          <td>
           <code class="literal">
            0
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Maximum Value
          </th>
          <td>
           <code class="literal">
            4294967295
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_trace_level">
        <code class="literal">
         rpl_semi_sync_source_trace_level
        </code>
       </a>
       is available when the
       <code class="literal">
        rpl_semi_sync_source
       </code>
       (
       <code class="filename">
        semisync_source.so
       </code>
       library) plugin is
            installed on the replica.
      </p>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_trace_level">
        <code class="literal">
         rpl_semi_sync_source_trace_level
        </code>
       </a>
       specifies the semisynchronous replication debug trace level
            on the source server. Four levels are defined:
      </p>
      <div class="itemizedlist">
       <ul class="itemizedlist" style="list-style-type: circle; ">
        <li class="listitem">
         <p>
          1 = general level (for example, time function failures)
         </p>
        </li>
        <li class="listitem">
         <p>
          16 = detail level (more verbose information)
         </p>
        </li>
        <li class="listitem">
         <p>
          32 = net wait level (more information about network
                waits)
         </p>
        </li>
        <li class="listitem">
         <p>
          64 = function level (information about function entry
                and exit)
         </p>
        </li>
       </ul>
      </div>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_rpl_semi_sync_source_wait_for_replica_count">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_for_replica_count">
        <code class="literal">
         rpl_semi_sync_source_wait_for_replica_count
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045144026592">
      </a>
      <a class="indexterm" name="idm46045144025472">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for rpl_semi_sync_source_wait_for_replica_count">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --rpl-semi-sync-source-wait-for-replica-count=#
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_for_replica_count">
             rpl_semi_sync_source_wait_for_replica_count
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Integer
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            1
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Minimum Value
          </th>
          <td>
           <code class="literal">
            1
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Maximum Value
          </th>
          <td>
           <code class="literal">
            65535
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_for_replica_count">
        <code class="literal">
         rpl_semi_sync_source_wait_for_replica_count
        </code>
       </a>
       is available when the
       <code class="literal">
        rpl_semi_sync_source
       </code>
       (
       <code class="literal">
        semisync_source.so
       </code>
       library) plugin is
            installed on the replica to set up semisynchronous
            replication.
      </p>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_for_replica_count">
        <code class="literal">
         rpl_semi_sync_source_wait_for_replica_count
        </code>
       </a>
       specifies the number of replica acknowledgments the source
            must receive per transaction before proceeding. By default
       <code class="literal">
        rpl_semi_sync_source_wait_for_replica_count
       </code>
       is
       <code class="literal">
        1
       </code>
       , meaning that semisynchronous
            replication proceeds after receiving a single replica
            acknowledgment. Performance is best for small values of this
            variable.
      </p>
      <p>
       For example, if
       <code class="literal">
        rpl_semi_sync_source_wait_for_replica_count
       </code>
       is
       <code class="literal">
        2
       </code>
       , then 2 replicas must acknowledge
            receipt of the transaction before the timeout period
            configured by
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_timeout">
        <code class="literal">
         rpl_semi_sync_source_timeout
        </code>
       </a>
       for semisynchronous replication to proceed. If fewer
            replicas acknowledge receipt of the transaction during the
            timeout period, the source reverts to normal replication.
      </p>
      <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
       <div class="admon-title">
        Note
       </div>
       <p>
        This behavior also depends on
        <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_no_replica">
         <code class="literal">
          rpl_semi_sync_source_wait_no_replica
         </code>
        </a>
        .
       </p>
      </div>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_rpl_semi_sync_source_wait_no_replica">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_no_replica">
        <code class="literal">
         rpl_semi_sync_source_wait_no_replica
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045143983856">
      </a>
      <a class="indexterm" name="idm46045143982816">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for rpl_semi_sync_source_wait_no_replica">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --rpl-semi-sync-source-wait-no-replica[={OFF|ON}]
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_no_replica">
             rpl_semi_sync_source_wait_no_replica
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Boolean
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            ON
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_no_replica">
        <code class="literal">
         rpl_semi_sync_source_wait_no_replica
        </code>
       </a>
       is available when the
       <code class="literal">
        rpl_semi_sync_source
       </code>
       (
       <code class="filename">
        semisync_source.so
       </code>
       library) plugin is
            installed on the replica.
      </p>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_no_replica">
        <code class="literal">
         rpl_semi_sync_source_wait_no_replica
        </code>
       </a>
       controls whether the source waits for the timeout period
            configured by
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_timeout">
        <code class="literal">
         rpl_semi_sync_source_timeout
        </code>
       </a>
       to expire, even if the replica count drops to less than the
            number of replicas configured by
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_for_replica_count">
        <code class="literal">
         rpl_semi_sync_source_wait_for_replica_count
        </code>
       </a>
       during the timeout period.
      </p>
      <p>
       When the value of
       <code class="literal">
        rpl_semi_sync_source_wait_no_replica
       </code>
       is
       <code class="literal">
        ON
       </code>
       (the default), it is permissible for
            the replica count to drop to less than
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_for_replica_count">
        <code class="literal">
         rpl_semi_sync_source_wait_for_replica_count
        </code>
       </a>
       during the timeout period. As long as enough replicas
            acknowledge the transaction before the timeout period
            expires, semisynchronous replication continues.
      </p>
      <p>
       When the value of
       <code class="literal">
        rpl_semi_sync_source_wait_no_replica
       </code>
       is
       <code class="literal">
        OFF
       </code>
       , if the replica count drops to less
            than the number configured in
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_for_replica_count">
        <code class="literal">
         rpl_semi_sync_source_wait_for_replica_count
        </code>
       </a>
       at any time during the timeout period configured by
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_timeout">
        <code class="literal">
         rpl_semi_sync_source_timeout
        </code>
       </a>
       ,
            the source reverts to normal replication.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="sysvar_rpl_semi_sync_source_wait_point">
       </a>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_point">
        <code class="literal">
         rpl_semi_sync_source_wait_point
        </code>
       </a>
      </p>
      <a class="indexterm" name="idm46045143942704">
      </a>
      <a class="indexterm" name="idm46045143941600">
      </a>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for rpl_semi_sync_source_wait_point">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --rpl-semi-sync-source-wait-point=value
           </code>
          </td>
         </tr>
         <tr>
          <th>
           System Variable
          </th>
          <td>
           <code class="literal">
            <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_point">
             rpl_semi_sync_source_wait_point
            </a>
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Scope
          </th>
          <td>
           Global
          </td>
         </tr>
         <tr>
          <th>
           Dynamic
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           <a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
            <code class="literal">
             SET_VAR
            </code>
           </a>
           Hint Applies
          </th>
          <td>
           No
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Enumeration
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            AFTER_SYNC
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Valid Values
          </th>
          <td>
           <p class="valid-value">
            <code class="literal">
             AFTER_SYNC
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             AFTER_COMMIT
            </code>
           </p>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_point">
        <code class="literal">
         rpl_semi_sync_source_wait_point
        </code>
       </a>
       is available when the
       <code class="literal">
        rpl_semi_sync_source
       </code>
       (
       <code class="filename">
        semisync_source.so
       </code>
       library) plugin is
            installed on the replica.
      </p>
      <p>
       <a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_point">
        <code class="literal">
         rpl_semi_sync_source_wait_point
        </code>
       </a>
       controls the point at which a semisynchronous replication
            source server waits for replica acknowledgment of
            transaction receipt before returning a status to the client
            that committed the transaction. These values are permitted:
      </p>
      <div class="itemizedlist">
       <ul class="itemizedlist" style="list-style-type: circle; ">
        <li class="listitem">
         <p>
          <code class="literal">
           AFTER_SYNC
          </code>
          (the default): The source
                writes each transaction to its binary log and the
                replica, and syncs the binary log to disk. The source
                waits for replica acknowledgment of transaction receipt
                after the sync. Upon receiving acknowledgment, the
                source commits the transaction to the storage engine and
                returns a result to the client, which then can proceed.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           AFTER_COMMIT
          </code>
          : The source writes each
                transaction to its binary log and the replica, syncs the
                binary log, and commits the transaction to the storage
                engine. The source waits for replica acknowledgment of
                transaction receipt after the commit. Upon receiving
                acknowledgment, the source returns a result to the
                client, which then can proceed.
         </p>
        </li>
       </ul>
      </div>
      <p>
       The replication characteristics of these settings differ as
            follows:
      </p>
      <div class="itemizedlist">
       <ul class="itemizedlist" style="list-style-type: circle; ">
        <li class="listitem">
         <p>
          With
          <code class="literal">
           AFTER_SYNC
          </code>
          , all clients see the
                committed transaction at the same time: After it has
                been acknowledged by the replica and committed to the
                storage engine on the source. Thus, all clients see the
                same data on the source.
         </p>
         <p>
          In the event of source failure, all transactions
                committed on the source have been replicated to the
                replica (saved to its relay log). An unexpected exit of
                the source server and failover to the replica is
                lossless because the replica is up to date. Note,
                however, that the source cannot be restarted in this
                scenario and must be discarded, because its binary log
                might contain uncommitted transactions that would cause
                a conflict with the replica when externalized after
                binary log recovery.
         </p>
        </li>
        <li class="listitem">
         <p>
          With
          <code class="literal">
           AFTER_COMMIT
          </code>
          , the client issuing
                the transaction gets a return status only after the
                server commits to the storage engine and receives
                replica acknowledgment. After the commit and before
                replica acknowledgment, other clients can see the
                committed transaction before the committing client.
         </p>
         <p>
          If something goes wrong such that the replica does not
                process the transaction, then in the event of an
                unexpected source server exit and failover to the
                replica, it is possible for such clients to see a loss
                of data relative to what they saw on the source.
         </p>
        </li>
       </ul>
      </div>
     </li>
    </ul>
   </div>
  </div>
 </div>
 <br/>
</div>
