<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="replication-features-current-user">
      </a>
      19.5.1.8 Replication of CURRENT_USER()
     </h4>
    </div>
   </div>
  </div>
  <p>
   The following statements support use of the
   <a class="link" href="information-functions.html#function_current-user">
    <code class="literal">
     CURRENT_USER()
    </code>
   </a>
   function to take
        the place of the name of, and possibly the host for, an affected
        user or a definer:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="link" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
       <code class="literal">
        DROP USER
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="rename-user.html" title="15.7.1.7 RENAME USER Statement">
       <code class="literal">
        RENAME USER
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="grant.html" title="15.7.1.6 GRANT Statement">
       <code class="literal">
        GRANT
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="revoke.html" title="15.7.1.8 REVOKE Statement">
       <code class="literal">
        REVOKE
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="create-function.html" title="15.1.14 CREATE FUNCTION Statement">
       <code class="literal">
        CREATE FUNCTION
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="create-procedure.html" title="15.1.17 CREATE PROCEDURE and CREATE FUNCTION Statements">
       <code class="literal">
        CREATE PROCEDURE
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="create-trigger.html" title="15.1.22 CREATE TRIGGER Statement">
       <code class="literal">
        CREATE TRIGGER
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="create-event.html" title="15.1.13 CREATE EVENT Statement">
       <code class="literal">
        CREATE EVENT
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="create-view.html" title="15.1.23 CREATE VIEW Statement">
       <code class="literal">
        CREATE VIEW
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="alter-event.html" title="15.1.3 ALTER EVENT Statement">
       <code class="literal">
        ALTER EVENT
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="alter-view.html" title="15.1.11 ALTER VIEW Statement">
       <code class="literal">
        ALTER VIEW
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="set-password.html" title="15.7.1.10 SET PASSWORD Statement">
       <code class="literal">
        SET PASSWORD
       </code>
      </a>
     </p>
    </li>
   </ul>
  </div>
  <p>
   When binary logging is enabled and
   <a class="link" href="information-functions.html#function_current-user">
    <code class="literal">
     CURRENT_USER()
    </code>
   </a>
   or
   <a class="link" href="information-functions.html#function_current-user">
    <code class="literal">
     CURRENT_USER
    </code>
   </a>
   is used as the
        definer in any of these statements, MySQL Server ensures that
        the statement is applied to the same user on both the source and
        the replica when the statement is replicated. In some cases,
        such as statements that change passwords, the function reference
        is expanded before it is written to the binary log, so that the
        statement includes the user name. For all other cases, the name
        of the current user on the source is replicated to the replica
        as metadata, and the replica applies the statement to the
        current user named in the metadata, rather than to the current
        user on the replica.
  </p>
 </div>
 <br/>
</div>
