--with-port=6667 should trump
sql/mysqld.cc:1361 (5.1.21-beta tarball) allows /etc/services to trump
$(configure --with-tcp-port=3307) by setting mysqld_port to the configure
option first, and then overriding it with the /etc/services entry. Why?
I expect that very few folks control that from /etc/services, and we can
allow them to continue by compiling with --with-tcp-port=0 checking first
if mysqld_port is 0 (patch attached).
if (!mysqld_port && (serv_ptr= getservbyname("mysql", "tcp")))
related discussion on #mysql-dev at 2007-09-02T21:28:41Z:
21:28:41Z set_ports() seems a little twisted:
21:28:43Z mysqld_port= MYSQL_PORT;
21:28:43Z if ((serv_ptr= getservbyname("mysql", "tcp")))
21:28:43Z mysqld_port= ntohs((u_short) serv_ptr->s_port); /* purecov: inspected */
21:29:39Z so if you $(configure --withe-port=3307), you'll get 3307
*unless* you have a /etc/services
21:30:02Z <Toad> yea does seem backwards
21:30:15Z <ericP> it's clever code, but i think the config option should
always trump
21:30:24Z <ericP> i.e. no reason to consult /etc/services
21:30:55Z <Toad> I wonder if anyone ever uses /etc/services to try to set
their service ports
21:30:56Z *maybe* if the user did --with-port=0...
21:30:58Z I know I don't expect that to happen
21:31:03Z -!- weigon__ is now known as weigon
21:31:59Z just in case, i guess i'll motion for
[[if (!mysql_port && (serv_ptr= getservbyname("mysql", "tcp")))...]]
--
-eric
office: +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
mobile: +1.617.599.3509
(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.
Received on Sun Sep 2 18:31:15 2007
This archive was generated by hypermail 2.1.8
: Sun Oct 07 2007 - 07:59:18 EDT
|