or is no longer in the majority. For more information on the mechanism, see Section 17.4.9, “Switching Sources with Asynchronous Connection Failover” . 

The source lists are stored in the mysql.replication_asynchronous_connection_failover  and mysql.replication_asynchronous_connection_failover_managed  tables, and can be viewed in the Performance Schema table replication_asynchronous_connection_failover . 

• asynchronous_connection_failover_add_source() 

Add configuration information for a replication source server to the source list for a replication channel. 

Syntax: 

asynchronous_connection_failover_add_source( channel , host , port , network_namespace , weight ) 

Arguments: 

• channel : The replication channel for which this replication source server is part of the source list. 

• host : The host name for this replication source server. 

• port : The port number for this replication source server. 

• network_namespace : The network namespace for this replication source server. Specify an empty string, as this parameter is reserved for future use. 

• weight : The priority of this replication source server in the replication channel’s source list. The priority is from 1 to 100, with 100 being the highest, and 50 being the default. When the asynchronous connection failover mechanism activates, the source with the highest priority setting among the alternative sources listed in the source list for the channel is chosen for the first connection attempt. If this attempt does not work, the replica tries with all the listed sources in descending order of priority, then starts again from the highest priority source. If multiple sources have the same priority, the replica orders them randomly. From MySQL 8.0.23, the asynchronous connection failover mechanism activates if the currently connected source is not the highest weighted in the group. 

Return value: 

A string containing the result of the operation, for example whether it was successful or not. 

Example: 

SELECT asynchronous_connection_failover_add_source(’channel2’, ’127.0.0.1’, 3310, ’’, 80); +-------------------------------------------------------------------------------------------------+ | asynchronous_connection_failover_add_source(’channel2’, ’127.0.0.1’, 3310, ’’, 80) | +-------------------------------------------------------------------------------------------------+ | Source configuration details successfully inserted. | +-------------------------------------------------------------------------------------------------+ 

For more information, see Section 17.4.9, “Switching Sources with Asynchronous Connection Failover” . 

• asynchronous_connection_failover_delete_source() 

Remove configuration information for a replication source server from the source list for a replication channel. 

Syntax: 

asynchronous_connection_failover_delete_source( channel , host , port , network_namespace ) 

