Commit Graph

3 Commits

Author SHA1 Message Date
d22f6d7b1c MXS-1743: Fix load balancing with router_options=master,slave
The code that selects the candidate backend always returned the root
master if the server bitmask contained the master bit. This should only be
done if the master bit is the only bit in the bitmask and when there are
other bits, the normal candidate selection code should be used.

Also added a query to the expanded test case to make sure the connection
actually works.
2018-06-04 15:17:48 +03:00
da4397a501 MXS-1743: Expand test case to cover load balancing
The test case now verifies that the servers are actually load balanced
correctly. This test reveals a problem in the readconnroute; the master is
always preferred over slaves if one is available with
router_options=master,slave.
2018-06-04 15:17:48 +03:00
4f8e1a99fc MXS-1743: Add test case
Added test case that reproduces the problem.
2018-04-04 19:43:46 +03:00