Giuseppe Maxia <g.maxia@gmail.com> writes:
The only documentation I found is the worklog.
Yes, docs will come of course, but they are not written yet. As Pavel mentioned, there are some changes compared to original design, that were done as a result of QA to fix some potential issues with the user experience.
Without docs at hand, I tried something:
slave1 [localhost] {msandbox} ((none)) > CHANGE MASTER TO master_gtid_pos=''; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'master_gtid_pos=''' at line 1 slave1 [localhost] {msandbox} ((none)) > CHANGE MASTER TO master_gtid_pos=auto; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'master_gtid_pos=auto' at line 1
As Pavel mentioned, the syntax is now: SET GLOBAL gtid_pos=""; CHANGE MASTER TO MASTER_USE_GTID=1;
However, neither of the suggested syntax works with the build currently released.
Strange ... can you share exact query and error message?
Moreover, since the commit comment mentions multiple masters, it would be nice to have some documentation that explains what to expect when using GTID and multiple masters.
If you do not want to wait for documentation, my best suggestion is to look at the mysql-test-run test cases: rpl.rpl_gtid* and multi_source.gtid*. They are kept up-to-date with every commit so are guaranteed to show what works. In mysql-test/suite/multi_source/gtid.test there is an example which starts with the topology M1->S1,M2->S1,S1->S2. It then moves S2 one level up: M1->S1,M2->S1,M1->S2,M2->S2 Finally it moves S1 down to have M1->S2,M2->S2,S2->S1 So it shows the ability to have multi-level multimaster setups, and move a slave server between itself having multiple direct masters, and being a single-master slave of a master server that is itself a slave of multiple masters. I spent a lot of effort in the design phase figuring out how to make this work, and it was a main motivation for the concept of domain_id. - Kristian.