Multi source replication
Multi source replication means that one server has many masters. This is a new feature in MariaDB 10.0.
New Syntax
You specify with master connection you want to work with by either specifying the connection name in the command or setting @@default_master_connection
to the connection you want to work with.
The connection name may include any characters and should be less than 64 characters. You should preferably keep this short as it will be used as a suffix for relay logs and master info index files.
The new syntax introduced to handle many connections are:
Replication variables for multi source
The new replication variable @@default_master_connection
specify with connection will be used for commands and variables if you don't specify a connection. By default this is ''
(the default connection name).
The following replication variables are local for the connection.
(In other words, they show the value for the @@default_master_connection
connection)
Type | Name | Description |
---|---|---|
Status | Slave_running | Shows if the slave is running |
Example:
set @@default_master_connection=''; show status like 'Slave_running'; set @@default_master_connection='other_connection'; show status like 'Slave_running';
If the @@default_master_connection contains a non existing name, you will get a warning.
All other master related variables are global and affects all connections.
See also:
The work in MariaDB is based on the project description at MDEV-253.