[MDEV-30348] show slave status is not consistent between named and unnamed source Created: 2023-01-05  Updated: 2023-01-05

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Trivial
Reporter: VAROQUI Stephane Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: multisource, replication


 Description   

Here is a ugly code from replication-manager to detect if a server is a slave

var ss dbhelper.SlaveStatus
	ss, _, errss := dbhelper.GetSlaveStatus(server.Conn, server.ClusterGroup.Conf.MasterConn, server.DBVersion)
	// We have no replicatieon can this be the old master
	//  1617 is no multi source channel found
	noChannel := false
	if errss != nil {
		if strings.Contains(errss.Error(), "1617") || strings.Contains(errss.Error(), "3074") {
			// This is a special case when using muti source there is a error instead of empty resultset when no replication is defined on channel
			//	server.ClusterGroup.LogPrintf(LvlInfo, " server: %s replication no channel err 1617 %s ", server.URL, errss)
			noChannel = true
		}
	}
	if errss == sql.ErrNoRows || noChannel {

As notice any reason not to send an empty result for show slave status for channel ? Get a consistant result with a regular show slave status , this issue is also in upstream but to make it harder error number is different


Generated at Thu Feb 08 10:15:34 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.