WL#3126: TCP address binding for mysql client library

Affects: Server-6.0 — Status: In-Progress — Priority: Medium

On clients with multiple possible TCP routes to a server 
it would be nice to be able to specify which of the clients
cofigured IP address to connect to the server from.

E.g. with my laptop that has both a wireless and a twisted
pair network interface both connectiong to the same network
segment on the same router i'd like to be able to configure 
which interface to use (preferably the wired one as it is faster,
but sometimes the wireless one as i might want to wander 
around), right now it just depends on which interface became
the default route for the network which itself depends on the
order in which the DHCP leases for the interfaces were received
on startup.

This also affects authentication against the MySQL server
as we authenticate client hosts by their connection IP 
address, so right now i need to add user entries for both
possible client addresses or have to use wildcards in the
host address part.
* add a new option MYSQL_OPT_BIND to mysql_options() that takes a DNS name or IP
address in string form as a char* argument

* extend CLI_MYSQL_REAL_CONNECT() in sql-common/client.c to bind to the
specified address on connect using the bind(2) system call after resolving the
specified address

* add --bind-address command line options to all bundled binaries using the
client API
see attached patch against yesterdays (Jan 29th) 5.2bk source

You must be logged in to tag this worklog

No Comments yet

Votes

Not yet rated.
You must be logged in to vote.

Watches

0 members are watching this worklog
You must be logged in to track this worklog.

Provide Feedback

Please note:
HTML will be purified, but we allow for a number of HTML tags so that you have the flexibility to decorate your comment text to some extent. The comments allow the following HTML tags:

strong, b, em, blockquote, a, code, pre

To put code into your comment, simply encapsulate your code with
[code language="XXX"][/code], where XXX is any common language, for instance "PHP", "SQL", "C", etc.



You must be logged in to comment