Re: [Maria-developers] [Commits] 9416779: MDEV-11636 Extra persistent columns on slave always gets NULL in RBR
abc <sachin.setiya@mariadb.com> 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.
Hi Kristian, On Wed, Dec 28, 2016 at 2:43 AM, Kristian Nielsen <knielsen@knielsen-hq.org> wrote:
abc <sachin.setiya@mariadb.com> 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.
Changed.
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.
Sorry this query is wrong , what I really wants to do is update while doing some select , I have updated the test case.
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?
Yes, But for update_row , I also have to fix find_row().
- Kristian.
-- Regards Sachin Setiya Software Engineer at MariaDB
participants (2)
-
Kristian Nielsen
-
Sachin Setiya