Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d5174aad
Commit
d5174aad
authored
17 years ago
by
tnurnberg@sin.intern.azundris.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/tnurnberg/15327/50-15327
into mysql.com:/home/tnurnberg/15327/51-15327
parents
8e22343c
3c6ca8d6
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
162 additions
and
26 deletions
+162
-26
client/mysql.cc
client/mysql.cc
+8
-3
client/mysql_upgrade.c
client/mysql_upgrade.c
+7
-2
client/mysqladmin.cc
client/mysqladmin.cc
+7
-1
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+8
-2
client/mysqlcheck.c
client/mysqlcheck.c
+7
-1
client/mysqlimport.c
client/mysqlimport.c
+7
-1
client/mysqlshow.c
client/mysqlshow.c
+7
-1
client/mysqltest.c
client/mysqltest.c
+7
-1
configure.in
configure.in
+28
-1
include/mysql_version.h.in
include/mysql_version.h.in
+1
-0
libmysql/libmysql.c
libmysql/libmysql.c
+17
-4
mysql-test/Makefile.am
mysql-test/Makefile.am
+1
-0
mysql-test/mysql-test-run-shell.sh
mysql-test/mysql-test-run-shell.sh
+10
-1
netware/mysql_test_run.c
netware/mysql_test_run.c
+2
-1
netware/mysqld_safe.c
netware/mysqld_safe.c
+1
-1
scripts/Makefile.am
scripts/Makefile.am
+1
-0
scripts/mysql_config.sh
scripts/mysql_config.sh
+6
-1
scripts/mysql_fix_privilege_tables.sh
scripts/mysql_fix_privilege_tables.sh
+1
-0
server-tools/instance-manager/priv.h
server-tools/instance-manager/priv.h
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+20
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+7
-1
tests/ssl_test.c
tests/ssl_test.c
+1
-1
tests/thread_test.c
tests/thread_test.c
+7
-1
No files found.
client/mysql.cc
View file @
d5174aad
...
...
@@ -685,9 +685,14 @@ static struct my_option my_long_options[] =
{
"pipe"
,
'W'
,
"Use named pipes to connect to server."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
{
"port"
,
'P'
,
"Port number to use for connection."
,
(
uchar
**
)
&
opt_mysql_port
,
(
uchar
**
)
&
opt_mysql_port
,
0
,
GET_UINT
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"port"
,
'P'
,
"Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default ("
STRINGIFY_ARG
(
MYSQL_PORT
)
")."
,
(
uchar
**
)
&
opt_mysql_port
,
(
uchar
**
)
&
opt_mysql_port
,
0
,
GET_UINT
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"prompt"
,
OPT_PROMPT
,
"Set the mysql prompt to this value."
,
(
uchar
**
)
&
current_prompt
,
(
uchar
**
)
&
current_prompt
,
0
,
GET_STR_ALLOC
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
This diff is collapsed.
Click to expand it.
client/mysql_upgrade.c
View file @
d5174aad
...
...
@@ -88,8 +88,13 @@ static struct my_option my_long_options[]=
{
"pipe"
,
'W'
,
"Use named pipes to connect to server."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
{
"port"
,
'P'
,
"Port number to use for connection."
,
0
,
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"port"
,
'P'
,
"Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default ("
STRINGIFY_ARG
(
MYSQL_PORT
)
")."
,
0
,
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"protocol"
,
OPT_MYSQL_PROTOCOL
,
"The protocol of connection (tcp,socket,pipe,memory)."
,
0
,
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
This diff is collapsed.
Click to expand it.
client/mysqladmin.cc
View file @
d5174aad
...
...
@@ -164,7 +164,13 @@ static struct my_option my_long_options[] =
{
"pipe"
,
'W'
,
"Use named pipes to connect to server."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
{
"port"
,
'P'
,
"Port number to use for connection."
,
(
uchar
**
)
&
tcp_port
,
{
"port"
,
'P'
,
"Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default ("
STRINGIFY_ARG
(
MYSQL_PORT
)
")."
,
(
uchar
**
)
&
tcp_port
,
(
uchar
**
)
&
tcp_port
,
0
,
GET_UINT
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"protocol"
,
OPT_MYSQL_PROTOCOL
,
"The protocol of connection (tcp,socket,pipe,memory)."
,
0
,
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
This diff is collapsed.
Click to expand it.
client/mysqlbinlog.cc
View file @
d5174aad
...
...
@@ -754,8 +754,14 @@ static struct my_option my_long_options[] =
0
,
GET_ULL
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"password"
,
'p'
,
"Password to connect to remote server."
,
0
,
0
,
0
,
GET_STR
,
OPT_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"port"
,
'P'
,
"Use port to connect to the remote server."
,
(
uchar
**
)
&
port
,
(
uchar
**
)
&
port
,
0
,
GET_INT
,
REQUIRED_ARG
,
0
,
0
,
0
,
{
"port"
,
'P'
,
"Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default ("
STRINGIFY_ARG
(
MYSQL_PORT
)
")."
,
(
uchar
**
)
&
port
,
(
uchar
**
)
&
port
,
0
,
GET_INT
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
},
{
"position"
,
'j'
,
"Deprecated. Use --start-position instead."
,
(
uchar
**
)
&
start_position
,
(
uchar
**
)
&
start_position
,
0
,
GET_ULL
,
...
...
This diff is collapsed.
Click to expand it.
client/mysqlcheck.c
View file @
d5174aad
...
...
@@ -137,7 +137,13 @@ static struct my_option my_long_options[] =
{
"pipe"
,
'W'
,
"Use named pipes to connect to server."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
{
"port"
,
'P'
,
"Port number to use for connection."
,
(
uchar
**
)
&
opt_mysql_port
,
{
"port"
,
'P'
,
"Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default ("
STRINGIFY_ARG
(
MYSQL_PORT
)
")."
,
(
uchar
**
)
&
opt_mysql_port
,
(
uchar
**
)
&
opt_mysql_port
,
0
,
GET_UINT
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"protocol"
,
OPT_MYSQL_PROTOCOL
,
"The protocol of connection (tcp,socket,pipe,memory)."
,
...
...
This diff is collapsed.
Click to expand it.
client/mysqlimport.c
View file @
d5174aad
...
...
@@ -133,7 +133,13 @@ static struct my_option my_long_options[] =
{
"pipe"
,
'W'
,
"Use named pipes to connect to server."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
{
"port"
,
'P'
,
"Port number to use for connection."
,
(
uchar
**
)
&
opt_mysql_port
,
{
"port"
,
'P'
,
"Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default ("
STRINGIFY_ARG
(
MYSQL_PORT
)
")."
,
(
uchar
**
)
&
opt_mysql_port
,
(
uchar
**
)
&
opt_mysql_port
,
0
,
GET_UINT
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"protocol"
,
OPT_MYSQL_PROTOCOL
,
"The protocol of connection (tcp,socket,pipe,memory)."
,
...
...
This diff is collapsed.
Click to expand it.
client/mysqlshow.c
View file @
d5174aad
...
...
@@ -190,7 +190,13 @@ static struct my_option my_long_options[] =
{
"password"
,
'p'
,
"Password to use when connecting to server. If password is not given it's asked from the tty."
,
0
,
0
,
0
,
GET_STR
,
OPT_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"port"
,
'P'
,
"Port number to use for connection."
,
(
uchar
**
)
&
opt_mysql_port
,
{
"port"
,
'P'
,
"Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default ("
STRINGIFY_ARG
(
MYSQL_PORT
)
")."
,
(
uchar
**
)
&
opt_mysql_port
,
(
uchar
**
)
&
opt_mysql_port
,
0
,
GET_UINT
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#ifdef __WIN__
...
...
This diff is collapsed.
Click to expand it.
client/mysqltest.c
View file @
d5174aad
...
...
@@ -4498,7 +4498,13 @@ static struct my_option my_long_options[] =
GET_INT
,
REQUIRED_ARG
,
500
,
1
,
10000
,
0
,
0
,
0
},
{
"password"
,
'p'
,
"Password to use when connecting to server."
,
0
,
0
,
0
,
GET_STR
,
OPT_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"port"
,
'P'
,
"Port number to use for connection."
,
(
uchar
**
)
&
opt_port
,
{
"port"
,
'P'
,
"Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default ("
STRINGIFY_ARG
(
MYSQL_PORT
)
")."
,
(
uchar
**
)
&
opt_port
,
(
uchar
**
)
&
opt_port
,
0
,
GET_INT
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"ps-protocol"
,
OPT_PS_PROTOCOL
,
"Use prepared statements protocol for communication"
,
(
uchar
**
)
&
ps_protocol
,
(
uchar
**
)
&
ps_protocol
,
0
,
...
...
This diff is collapsed.
Click to expand it.
configure.in
View file @
d5174aad
...
...
@@ -676,7 +676,34 @@ AC_ARG_WITH(tcp-port,
[
--with-tcp-port
=
port-number
Which port to use
for
MySQL services
(
default 3306
)]
,
[
MYSQL_TCP_PORT
=
$withval
]
,
[
MYSQL_TCP_PORT
=
$MYSQL_TCP_PORT_DEFAULT
]
[
MYSQL_TCP_PORT
=
$MYSQL_TCP_PORT_DEFAULT
# if we actually defaulted (as opposed to the pathological case of
# --with-tcp-port=<MYSQL_TCP_PORT_DEFAULT> which might in theory
# happen if whole batch of servers was built from a script), set
# the default to zero to indicate that; we don't lose information
# that way, because 0 obviously indicates that we can get the
# default value from MYSQL_TCP_PORT. this seems really evil, but
# testing for MYSQL_TCP_PORT==MYSQL_TCP_PORT_DEFAULT would make a
# a port of MYSQL_TCP_PORT_DEFAULT magic even if the builder did not
# intend it to mean "use the default, in fact, look up a good default
# from /etc/services if you can", but really, really meant 3306 when
# they passed in 3306. When they pass in a specific value, let them
# have it; don't second guess user and think we know better, this will
# just make people cross. this makes the the logic work like this
# (which is complicated enough):
#
# - if a port was set during build, use that as a default.
#
# - otherwise, try to look up a port in /etc/services; if that fails,
# use MYSQL_TCP_PORT_DEFAULT (at the time of this writing 3306)
#
# - allow the MYSQL_TCP_PORT environment variable to override that.
#
# - allow command-line parameters to override all of the above.
#
# the top-most MYSQL_TCP_PORT_DEFAULT is read from win/configure.js,
# so don't mess with that.
MYSQL_TCP_PORT_DEFAULT
=
0
]
)
AC_SUBST
(
MYSQL_TCP_PORT
)
# We might want to document the assigned port in the manual.
...
...
This diff is collapsed.
Click to expand it.
include/mysql_version.h.in
View file @
d5174aad
...
...
@@ -15,6 +15,7 @@
#define FRM_VER @DOT_FRM_VERSION@
#define MYSQL_VERSION_ID @MYSQL_VERSION_ID@
#define MYSQL_PORT @MYSQL_TCP_PORT@
#define MYSQL_PORT_DEFAULT @MYSQL_TCP_PORT_DEFAULT@
#define MYSQL_UNIX_ADDR "@MYSQL_UNIX_ADDR@"
#define MYSQL_CONFIG_NAME "my"
#define MYSQL_COMPILATION_COMMENT "@COMPILATION_COMMENT@"
...
...
This diff is collapsed.
Click to expand it.
libmysql/libmysql.c
View file @
d5174aad
...
...
@@ -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
}
...
...
This diff is collapsed.
Click to expand it.
mysql-test/Makefile.am
View file @
d5174aad
...
...
@@ -150,6 +150,7 @@ SUFFIXES = .sh
-e
's!@''PERL''@!@PERL@!'
\
-e
's!@''VERSION''@!@VERSION@!'
\
-e
's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!'
\
-e
's!@''MYSQL_TCP_PORT_DEFAULT''@!@MYSQL_TCP_PORT_DEFAULT@!'
\
-e
's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!'
\
-e
's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!'
\
-e
's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!'
\
...
...
This diff is collapsed.
Click to expand it.
mysql-test/mysql-test-run-shell.sh
View file @
d5174aad
...
...
@@ -23,7 +23,16 @@ USE_MANAGER=0
MY_TZ
=
GMT-3
TZ
=
$MY_TZ
;
export
TZ
# for UNIX_TIMESTAMP tests to work
LOCAL_SOCKET
=
@MYSQL_UNIX_ADDR@
MYSQL_TCP_PORT
=
@MYSQL_TCP_PORT@
if
[
-z
"
$MYSQL_TCP_PORT
"
]
;
then
MYSQL_TCP_PORT
=
@MYSQL_TCP_PORT@
if
[
@MYSQL_TCP_PORT_DEFAULT@
-eq
0
]
;
then
ESP
=
`
getent services mysql/tcp
`
if
[
$?
-eq
0
]
;
then
MYSQL_TCP_PORT
=
`
echo
"
$ESP
"
|sed
-e
's-^[a-z]*[ ]*\([0-9]*\)/[a-z]*$-\1-g'
`
fi
fi
fi
umask
022
...
...
This diff is collapsed.
Click to expand it.
netware/mysql_test_run.c
View file @
d5174aad
...
...
@@ -1169,7 +1169,8 @@ void setup(char *file)
setenv
(
"MYSQL_BINLOG"
,
file_path
,
1
);
setenv
(
"MASTER_MYPORT"
,
"9306"
,
1
);
setenv
(
"SLAVE_MYPORT"
,
"9307"
,
1
);
setenv
(
"MYSQL_TCP_PORT"
,
"3306"
,
1
);
snprintf
(
file_path
,
PATH_MAX
*
2
,
"%d"
,
MYSQL_PORT
);
setenv
(
"MYSQL_TCP_PORT"
,
file_path
,
1
);
snprintf
(
file_path
,
PATH_MAX
*
2
,
"%s/mysql_client_test --no-defaults --testcase--user=root --port=%u "
,
bin_dir
,
master_port
);
setenv
(
"MYSQL_CLIENT_TEST"
,
file_path
,
1
);
snprintf
(
file_path
,
PATH_MAX
*
2
,
"%s/mysql --no-defaults --user=root --port=%u "
,
bin_dir
,
master_port
);
...
...
This diff is collapsed.
Click to expand it.
netware/mysqld_safe.c
View file @
d5174aad
...
...
@@ -189,7 +189,7 @@ void start_defaults(int argc, char *argv[])
snprintf
(
address
,
PATH_MAX
,
"0.0.0.0"
);
// port
snprintf
(
port
,
PATH_MAX
,
"
3306"
);
snprintf
(
port
,
PATH_MAX
,
"
%d"
,
MYSQL_PORT
);
// default option
default_option
[
0
]
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
scripts/Makefile.am
View file @
d5174aad
...
...
@@ -163,6 +163,7 @@ SUFFIXES = .sh
-e
's!@''MYSQLD_DEFAULT_SWITCHES''@!@MYSQLD_DEFAULT_SWITCHES@!'
\
-e
's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!'
\
-e
's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!'
\
-e
's!@''MYSQL_TCP_PORT_DEFAULT''@!@MYSQL_TCP_PORT_DEFAULT@!'
\
-e
's!@''TARGET_LINUX''@!@TARGET_LINUX@!'
\
-e
"s!@""CONF_COMMAND""@!@CONF_COMMAND@!"
\
-e
's!@''MYSQLD_USER''@!@MYSQLD_USER@!'
\
...
...
This diff is collapsed.
Click to expand it.
scripts/mysql_config.sh
View file @
d5174aad
...
...
@@ -92,9 +92,14 @@ fix_path pkgincludedir include/mysql include
version
=
'@VERSION@'
socket
=
'@MYSQL_UNIX_ADDR@'
port
=
'@MYSQL_TCP_PORT@'
ldflags
=
'@LDFLAGS@'
if
[
@MYSQL_TCP_PORT_DEFAULT@
-eq
0
]
;
then
port
=
0
else
port
=
@MYSQL_TCP_PORT@
fi
# Create options
# We intentionally add a space to the beginning and end of lib strings, simplifies replace later
libs
=
"
$ldflags
-L
$pkglibdir
-lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
...
...
This diff is collapsed.
Click to expand it.
scripts/mysql_fix_privilege_tables.sh
View file @
d5174aad
...
...
@@ -25,6 +25,7 @@ sql_only=0
basedir
=
"@prefix@"
verbose
=
0
args
=
""
# no elaborate fallback here; with no argument, it will happen in "mysql"
port
=
""
socket
=
""
database
=
"mysql"
...
...
This diff is collapsed.
Click to expand it.
server-tools/instance-manager/priv.h
View file @
d5174aad
...
...
@@ -29,7 +29,7 @@
#include "portability.h"
/* IM-wide platform-independent defines */
#define SERVER_DEFAULT_PORT
3306
#define SERVER_DEFAULT_PORT
MYSQL_PORT
#define DEFAULT_MONITORING_INTERVAL 20
#define DEFAULT_PORT 2273
/* three-week timeout should be enough */
...
...
This diff is collapsed.
Click to expand it.
sql/mysqld.cc
View file @
d5174aad
...
...
@@ -1356,8 +1356,21 @@ static void set_ports()
{
// Get port if not from commandline
struct
servent
*
serv_ptr
;
mysqld_port
=
MYSQL_PORT
;
/*
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"
)))
mysqld_port
=
ntohs
((
u_short
)
serv_ptr
->
s_port
);
/* purecov: inspected */
#endif
if
((
env
=
getenv
(
"MYSQL_TCP_PORT"
)))
mysqld_port
=
(
uint
)
atoi
(
env
);
/* purecov: inspected */
}
...
...
@@ -5607,7 +5620,13 @@ master-ssl",
{
"pid-file"
,
OPT_PID_FILE
,
"Pid file used by safe_mysqld."
,
(
uchar
**
)
&
pidfile_name_ptr
,
(
uchar
**
)
&
pidfile_name_ptr
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"port"
,
'P'
,
"Port number to use for connection."
,
(
uchar
**
)
&
mysqld_port
,
{
"port"
,
'P'
,
"Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default ("
STRINGIFY_ARG
(
MYSQL_PORT
)
")."
,
(
uchar
**
)
&
mysqld_port
,
(
uchar
**
)
&
mysqld_port
,
0
,
GET_UINT
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"port-open-timeout"
,
OPT_PORT_OPEN_TIMEOUT
,
"Maximum time in seconds to wait for the port to become free. "
...
...
This diff is collapsed.
Click to expand it.
tests/mysql_client_test.c
View file @
d5174aad
...
...
@@ -16327,7 +16327,13 @@ static struct my_option client_test_long_options[] =
{
"password"
,
'p'
,
"Password to use when connecting to server. If password is not given it's asked from the tty."
,
0
,
0
,
0
,
GET_STR
,
OPT_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"port"
,
'P'
,
"Port number to use for connection"
,
(
uchar
**
)
&
opt_port
,
{
"port"
,
'P'
,
"Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default ("
STRINGIFY_ARG
(
MYSQL_PORT
)
")."
,
(
uchar
**
)
&
opt_port
,
(
uchar
**
)
&
opt_port
,
0
,
GET_UINT
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"server-arg"
,
'A'
,
"Send embedded server this as a parameter."
,
0
,
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
This diff is collapsed.
Click to expand it.
tests/ssl_test.c
View file @
d5174aad
...
...
@@ -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
(
""
);
...
...
This diff is collapsed.
Click to expand it.
tests/thread_test.c
View file @
d5174aad
...
...
@@ -103,7 +103,13 @@ static struct my_option my_long_options[] =
(
uchar
**
)
&
verbose
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"query"
,
'Q'
,
"Query to execute in each threads"
,
(
uchar
**
)
&
query
,
(
uchar
**
)
&
query
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"port"
,
'P'
,
"Port number to use for connection"
,
(
uchar
**
)
&
tcp_port
,
{
"port"
,
'P'
,
"Port number to use for connection or 0 for default to, in "
"order of preference, my.cnf, $MYSQL_TCP_PORT, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
"built-in default ("
STRINGIFY_ARG
(
MYSQL_PORT
)
")."
,
(
uchar
**
)
&
tcp_port
,
(
uchar
**
)
&
tcp_port
,
0
,
GET_UINT
,
REQUIRED_ARG
,
MYSQL_PORT
,
0
,
0
,
0
,
0
,
0
},
{
"socket"
,
'S'
,
"Socket file to use for connection"
,
(
uchar
**
)
&
unix_socket
,
(
uchar
**
)
&
unix_socket
,
0
,
GET_STR_ALLOC
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment