1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Bug #15327: configure: --with-tcp-port option being partially ignored

make sure that if builder configured with a non-standard (!= 3306)
default TCP port that value actually gets used throughout. if they
didn't configure a value, assume "use a sensible default", which
will be read from /etc/services or, failing that, from the factory
default. That makes the order of preference
- command-line option
- my.cnf, where applicable
- $MYSQL_TCP_PORT environment variable
- /etc/services (unless configured --with-tcp-port)
- default port (--with-tcp-port=... or factory default)
This commit is contained in:
tnurnberg@mysql.com/sin.intern.azundris.com
2007-09-13 16:19:46 +02:00
parent 4a52b5c885
commit 3c6ca8d6ed
26 changed files with 176 additions and 30 deletions

View File

@ -44,7 +44,7 @@ int main(int argc, char **argv)
"../SSL/MySQL-client-cert.pem",
"../SSL/MySQL-ca-cert.pem", 0, 0);
#endif
if (!(sock = mysql_real_connect(&mysql,"127.0.0.1",0,0,argv[1],3306,NULL,0)))
if (!(sock = mysql_real_connect(&mysql,"127.0.0.1",0,0,argv[1],MYSQL_PORT,NULL,0)))
{
fprintf(stderr,"Couldn't connect to engine!\n%s\n\n",mysql_error(&mysql));
perror("");