Bug #46132 proxy-backend-addresses=<multiple values> is half broken
Submitted: 12 Jul 2009 7:20 Modified: 14 Jul 2009 14:40
Reporter: Diego Medina Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Proxy: Core Severity:S2 (Serious)
Version:0.8.0 r757 OS:Any
Assigned to: MEM Agent Devs CPU Architecture:Any

[12 Jul 2009 7:20] Diego Medina
Description:
Using 

Case A
--proxy-backend-addresses=127.0.0.1:5132 \
--proxy-backend-addresses=127.0.0.1:5136

should be the same as
Case B
--proxy-backend-addresses=127.0.0.1:5132,127.0.0.1:5136

but it is not.

1- 
print("Number of backends: " .. #proxy.global.backends)
returns 2 for case A, but only 1 for case B.

2- If the first server is down, and you try to connect to port 4040

Case A: You connect to the server on port 5136
Case B: You get an error on the mysql client that all the backends are down. (which is not true)

How to repeat:
1- Have two mysql server running
2- Start the proxy like this:

$ sbin/mysql-proxy \
 --proxy-backend-addresses=127.0.0.1:5132 \
 --proxy-backend-addresses=127.0.0.1:5136

3- Stop the second server
4- Connect to port 4040 (proxy)
(you will connect just fine)

5- Stop the proxy, and start it like this:
$ sbin/mysql-proxy \
 --proxy-backend-addresses=127.0.0.1:5132,127.0.0.1:5136

6- Try to connect using the mysql client to port 4040
You will get this error message:
"ERROR 1105 (00000): #07000(proxy) all backends are down"
[14 Jul 2009 14:40] Jan Kneschke
The Case B notation is not supported on the commandlines. It is treated as one address only.

Another bug should be opened that tracks that we even accept the invalid IP address "ip:port,ip:port". Like other characters than a comma will also be accepted.
[11 Sep 2009 15:43] Diego Medina
See http://bugs.mysql.com/bug.php?id=47273