← Back to team overview

maria-developers team mailing list archive

Re: GTID and replication of mysql database

 

Pavel Ivanov <pivanof@xxxxxxxxxx> writes:

> Could you please tell me, in your implementation of GTIDs did you make
> something special for the case when mysql database is replicated? I
> guess mysql.rpl_slave_state cannot be replicated in any circumstances,
> so did you put any safeguards to not replicate it or it's totally up
> to MariaDB users?

In rpl_slave_state::record_gtid(), there is this to prevent replicating
updates of the mysql.rpl_slave_state table:

  table->no_replicate= 1;

Other than that, I do not know of any special handling needed for the mysql
database. Did you have something special in mind?

Note that the user should not update mysql.rpl_slave_state manually. Except
perhaps to ALTER TABLE ... ENGINE=xxx (which can be replicated). To change the
GTID position, use SET GLOBAL gtid_pos='0-1-10', which will update
mysql.rpl_slave_state as needed.

BTW, yesterday I merged GTID into lp:maria/10.0, so now the code is in the
main tree and will be included in the next 10.0.2 alpha release.

 - Kristian.


Follow ups