content_image/849274.jpg
## 17.5.1.8 Replication of CURRENT_USER() 

The following statements support use of the CURRENT_USER()  function to take the place of the name of, and possibly the host for, an affected user or a definer: 

• DROP USER 

• RENAME USER 

• GRANT 

• REVOKE 

• CREATE FUNCTION 

• CREATE PROCEDURE 

• CREATE TRIGGER 

• CREATE EVENT 

• CREATE VIEW 

• ALTER EVENT 

• ALTER VIEW 

• SET PASSWORD 

When binary logging is enabled and CURRENT_USER()  or CURRENT_USER  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. 

## 17.5.1.9 Replication with Differing Table Definitions on Source and Replica 

Source and target tables for replication do not have to be identical. A table on the source can have more or fewer columns than the replica’s copy of the table. In addition, corresponding table columns on the source and the replica can use different data types, subject to certain conditions. 

<img src='content_image/849274.jpg'>

## Note 

Replication between tables which are partitioned differently from one another is not supported. See Section 17.5.1.24, “Replication and Partitioning” . 

In all cases where the source and target tables do not have identical definitions, the database and table names must be the same on both the source and the replica. Additional conditions are discussed, with examples, in the following two sections. 

## Replication with More Columns on Source or Replica 

You can replicate a table from the source to the replica such that the source and replica copies of the table have differing numbers of columns, subject to the following conditions: 

