MariaDB and MySQL both implement the multi-source replication, but their usage and internal implementation are different. In order to facilitate the migration of MySQL users to MariaDB, we want to support MySQL syntax
- For CHANGE MASTER/FLUSH RELAY LOG/RESET SLAVE/SHOW RELAY LOG EVENT/SHOW SLAVE STATUS/START SLAVE/STOP SLAVE commands support FOR CHANNEL syntax
- "FOR CHANNEL" is just an alias for connection_name, does not change the original implementation, all behaviors are consistent with MariaDB, so some operations are not compatible with MySQL, For example:
(MySQL) When a replica has multiple channels and a FOR CHANNEL channel option is not specified, a valid statement generally acts on all available channels, with some specific exceptions.
(MariaDB) You specify which primary 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 channel name supports up to 64 bytes, and is not case sensitive
- The connection name and for channel syntax cannot be used at the same time, otherwise an error will be reported
- MariaDB syntax is highly compatible with MySQL, so there is no special SQL_MODE set like Oracle/SQL Server and other databases, FOR CHANNEL is not affected by SQL_MODE