From c506559452cdc13b350670cdb90fe95e92ae9271 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Thu, 4 Feb 2016 11:16:44 +0200 Subject: [PATCH] MXS-400: Servers that are both master and slave now work with readwritesplit The check for the server status explicitly denied servers that are both master and slave from being chosed as candidates for queries. This is only a problem when a user manually sets the server states to both master and slave. The monitors resolve the replication topology based on the servers that the monitors see and this always results in at least one slave server. --- server/include/server.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/include/server.h b/server/include/server.h index c8c884b96..7fb30fdf6 100644 --- a/server/include/server.h +++ b/server/include/server.h @@ -148,7 +148,7 @@ typedef struct server { #define SERVER_IS_MASTER(server) SRV_MASTER_STATUS((server)->status) #define SRV_MASTER_STATUS(status) ((status & \ - (SERVER_RUNNING|SERVER_MASTER|SERVER_SLAVE|SERVER_MAINT)) == \ + (SERVER_RUNNING|SERVER_MASTER|SERVER_MAINT)) == \ (SERVER_RUNNING|SERVER_MASTER)) /** @@ -163,7 +163,7 @@ typedef struct server { * in order for the macro to return true */ #define SERVER_IS_SLAVE(server) \ - (((server)->status & (SERVER_RUNNING|SERVER_MASTER|SERVER_SLAVE|SERVER_MAINT)) == \ + (((server)->status & (SERVER_RUNNING|SERVER_SLAVE|SERVER_MAINT)) == \ (SERVER_RUNNING|SERVER_SLAVE)) /**