Hi,
I'm building a multi-source replication on mysql 5.7.7-rc. The scenario in my side is there are multiple mysql instances, all of them has the same table structure, but with different data, all I need to do is to merge all the data into 1 replica mysql instance.
Therefore I planned to add 1 column in replica database tables named master-name, next step is to write a "before update/insert" trigger to update the replica table when every time insert/update come. BUT, I found it's not easy to identify the source of the insert/update.
Some findings from my side:
1. I can find replication channel information from table "performance_schema.replication_connection_configuration".
2. Also there is process information on information_schema.PROCESSLIST.
Which mysql master instance does the insert/update comes from?
Thanks in advance!
-Gabriel
I'm building a multi-source replication on mysql 5.7.7-rc. The scenario in my side is there are multiple mysql instances, all of them has the same table structure, but with different data, all I need to do is to merge all the data into 1 replica mysql instance.
Therefore I planned to add 1 column in replica database tables named master-name, next step is to write a "before update/insert" trigger to update the replica table when every time insert/update come. BUT, I found it's not easy to identify the source of the insert/update.
Some findings from my side:
1. I can find replication channel information from table "performance_schema.replication_connection_configuration".
2. Also there is process information on information_schema.PROCESSLIST.
Which mysql master instance does the insert/update comes from?
Thanks in advance!
-Gabriel