Bug #47273 proxy-backend-addresses does not validate ip:port format
Submitted: 11 Sep 2009 15:42 Modified: 7 Dec 2009 9:23
Reporter: Diego Medina Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Proxy: Core Severity:S3 (Non-critical)
Version:0.8.0 OS:Any
Assigned to: Jan Kneschke CPU Architecture:Any

[11 Sep 2009 15:42] Diego Medina
Description:
The mysql proxy command line option
--proxy-backend-addresses 
accepts values like:

192.168.0.1:1122,192.145.0.9:3306

but treats them as one address only.

See also bug#46132

How to repeat:
1- Have two mysqld server running

2- Start the proxy with this option:

$ ./mysql-proxy --backend-addresses=192.168.0.1:5132,192.168.0.1:5138

3- stop the server on port 5132
4- Send a query through the proxy
5- You will get an error telling you that all backends are down.

Suggested fix:
Give the user an error telling them to specify only one ip:port pair of values. And allow users to specify the --proxy-backend-addresses several times for all their backends
[28 Sep 2009 15:08] Jan Kneschke
revno: 818
committer: jan@mysql.com
branch nick: trunk
timestamp: Fri 2009-09-11 17:12:29 +0200
message:
  fixed parsing of invalid IP addresses
[28 Sep 2009 15:35] Enterprise Tools JIRA Robot
Diego Medina writes: 
Verified fixed on 0.8.0

2009-09-28 11:32:07: (critical) network-address.c:168: IP-address has to be in the form [<ip>][:<port>], 
is '192.168.0.1:5132,192.168.0.1:5138'. Failed to parse the port at ',192.168.0.1:5138'
[7 Dec 2009 9:23] MC Brown
An entry has been added to the 0.8.0 changelog: 

The supplied script <filename>ro-balance.lua</filename> had not been updated to use the <literal>resultset_is_needed</literal> and updated <literal>proxy.connection.dst.name</literal> structure.