• Mats Kindahl's avatar
    WL#5151: Conversion between different types when replicating · c63df11f
    Mats Kindahl authored
    Row-based replication requires the types of columns on the
    master and slave to be approximately the same (some safe
    conversions between strings are allowed), but does not
    allow safe conversions between fields of similar types such
    as TINYINT and INT.
    
    This patch implement type conversions between similar fields
    on the master and slave.
    
    The conversions are controlled using a new variable
    SLAVE_TYPE_CONVERSIONS of type SET('ALL_LOSSY','ALL_NON_LOSSY').
    
    Non-lossy conversions are any conversions that do not run the
    risk of losing any information, while lossy conversions can
    potentially truncate the value. The column definitions are
    checked to decide if the conversion is acceptable.
    
    If neither conversion is enabled, it is required that the
    definitions of the columns are identical on master and slave.
    
    Conversion is done by creating an internal conversion table,
    unpacking the master data into it, and then copy the data to
    the real table on the slave.
    c63df11f
rpl_bug31076.result 3.55 KB