← Back to team overview

maria-developers team mailing list archive

Re: [Commits] 9416779: MDEV-11636 Extra persistent columns on slave always gets NULL in RBR

 

abc <sachin.setiya@xxxxxxxxxxx> writes:

> I have updates the patch, please have a look,

> revision-id: 941677928aa40aa1f5abf981b74d2c3c80441459 (mariadb-galera-10.0.28-8-g9416779)
> parent(s): be430b80df0cdd4eba32df1570195721dbfd1b39
> author: Sachin Setiya
> committer: Sachin Setiya
> timestamp: 2016-12-27 15:40:28 +0530
> message:
>
> MDEV-11636 Extra persistent columns on slave always gets NULL in RBR

The patch looks ok now.

> Problem:- In replication if slave has extra persistent column then these
> column are not computed while applying write-set from master.
>
> Solution:- While applying write-set from server, we will generate values
> for extra persistent columns.

"write-set" is a Galera term. In replication, they are refered to as binlog
events, or row events in the specific case of row-based replication events.

> diff --git a/mysql-test/suite/rpl/t/rpl_alter_extra_persistent.test b/mysql-test/suite/rpl/t/rpl_alter_extra_persistent.test

> +--echo #SELECT quert
> +--connection master
> +select * from t1 where a > 2 and a < 4;
> +
> +--sync_slave_with_master
> +select * from t1 where a > 2 and a < 4;

You do not need to sync_slave_with_master for SELECT.

> diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc
> index df8036c..21b8a80 100644
> --- a/sql/rpl_record.cc
> +++ b/sql/rpl_record.cc
> @@ -408,6 +408,12 @@ unpack_row(rpl_group_info *rgi,
>    }
>  
>    /*
> +    Add Extra slave persistent columns
> +  */
> +  if ((error= fill_extra_persistent_columns(table, cols->n_bits)))
> +    DBUG_RETURN(error);

You moved this from write_row() to unpack_row(), so I assume this was to fix
the similar bug for updates?

 - Kristian.


Follow ups