Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.5.16
-
None
Description
If readconnroute is configured with router_options=slave but it ends up choosing a server labeled as Master, Running for the connection, all queries will be counted as writes for the statistics.
The reason this happens is because the internal bitmask value is modified with SERVER_MASTER to accept the server even it doesn't have the SERVER_SLAVE bit on. Since the code checks for the SERVER_MASTER bit when incrementing the counters, it falsely counts it as a write when it should be counted as a read due to router_options=slave.