mirror of
https://github.com/MariaDB/server.git
synced 2025-06-13 13:01:51 +03:00
Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into ramayana.hindu.god:/home/tsmith/m/bk/maint/51 configure.in: Auto merged libmysql/libmysql.c: Auto merged scripts/mysql_config.sh: Auto merged
This commit is contained in:
@ -133,10 +133,23 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
|
||||
{
|
||||
struct servent *serv_ptr;
|
||||
char *env;
|
||||
if ((serv_ptr = getservbyname("mysql", "tcp")))
|
||||
mysql_port = (uint) ntohs((ushort) serv_ptr->s_port);
|
||||
if ((env = getenv("MYSQL_TCP_PORT")))
|
||||
mysql_port =(uint) atoi(env);
|
||||
|
||||
/*
|
||||
if builder specifically requested a default port, use that
|
||||
(even if it coincides with our factory default).
|
||||
only if they didn't do we check /etc/services (and, failing
|
||||
on that, fall back to the factory default of 3306).
|
||||
either default can be overridden by the environment variable
|
||||
MYSQL_TCP_PORT, which in turn can be overridden with command
|
||||
line options.
|
||||
*/
|
||||
|
||||
#if MYSQL_PORT_DEFAULT == 0
|
||||
if ((serv_ptr = getservbyname("mysql", "tcp")))
|
||||
mysql_port = (uint) ntohs((ushort) serv_ptr->s_port);
|
||||
#endif
|
||||
if ((env = getenv("MYSQL_TCP_PORT")))
|
||||
mysql_port =(uint) atoi(env);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user