Commit 77be4587 authored by unknown's avatar unknown

mysql* -P 3307 uses TCP/IP now.


Docs/manual.texi:
  ChangeLog entry added.
parent 6aef130b
...@@ -40713,6 +40713,8 @@ not yet 100 % confident in this code. ...@@ -40713,6 +40713,8 @@ not yet 100 % confident in this code.
@node News-3.23.33, News-3.23.32, News-3.23.x, News-3.23.x @node News-3.23.33, News-3.23.32, News-3.23.x, News-3.23.x
@appendixsubsec Changes in release 3.23.33 @appendixsubsec Changes in release 3.23.33
@itemize @bullet @itemize @bullet
@item
Changed clients to use TCP/IP when -P or --port option is specified.
@end itemize @end itemize
@node News-3.23.32, News-3.23.31, News-3.23.33, News-3.23.x @node News-3.23.32, News-3.23.31, News-3.23.33, News-3.23.x
...@@ -692,6 +692,10 @@ static int get_options(int argc, char **argv) ...@@ -692,6 +692,10 @@ static int get_options(int argc, char **argv)
skip_column_names=1; skip_column_names=1;
break; break;
case 'P': case 'P':
if(!current_host) {
my_free(current_host, MYF(MY_ALLOW_ZERO_PTR));
current_host=my_strdup("127.0.0.1", MYF(MY_WME));
};
opt_mysql_port= (unsigned int) atoi(optarg); opt_mysql_port= (unsigned int) atoi(optarg);
break; break;
case 'S': case 'S':
......
...@@ -185,6 +185,10 @@ int main(int argc,char *argv[]) ...@@ -185,6 +185,10 @@ int main(int argc,char *argv[])
interval=atoi(optarg); interval=atoi(optarg);
break; break;
case 'P': case 'P':
if(!host) {
my_free(host, MYF(MY_ALLOW_ZERO_PTR));
host=my_strdup("127.0.0.1", MYF(MY_WME));
};
tcp_port= (unsigned int) atoi(optarg); tcp_port= (unsigned int) atoi(optarg);
break; break;
case 'r': case 'r':
......
...@@ -344,6 +344,10 @@ static int get_options(int *argc,char ***argv) ...@@ -344,6 +344,10 @@ static int get_options(int *argc,char ***argv)
tty_password=1; tty_password=1;
break; break;
case 'P': case 'P':
if(!current_host) {
my_free(current_host, MYF(MY_ALLOW_ZERO_PTR));
current_host=my_strdup("127.0.0.1", MYF(MY_WME));
};
opt_mysql_port= (unsigned int) atoi(optarg); opt_mysql_port= (unsigned int) atoi(optarg);
break; break;
case 'S': case 'S':
......
...@@ -238,6 +238,10 @@ get_options(int *argc,char ***argv) ...@@ -238,6 +238,10 @@ get_options(int *argc,char ***argv)
break; break;
#endif #endif
case 'P': case 'P':
if(!host) {
my_free(host, MYF(MY_ALLOW_ZERO_PTR));
host=my_strdup("127.0.0.1", MYF(MY_WME));
};
opt_mysql_port= (unsigned int) atoi(optarg); opt_mysql_port= (unsigned int) atoi(optarg);
break; break;
case 'S': case 'S':
......
...@@ -1149,6 +1149,10 @@ int parse_args(int argc, char **argv) ...@@ -1149,6 +1149,10 @@ int parse_args(int argc, char **argv)
tty_password=1; tty_password=1;
break; break;
case 'P': case 'P':
if(!host) {
my_free(host, MYF(MY_ALLOW_ZERO_PTR));
host=my_strdup("127.0.0.1", MYF(MY_WME));
};
port = atoi(optarg); port = atoi(optarg);
break; break;
case 'S': case 'S':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment