Commit e7b76f87 authored by Daniel Black's avatar Daniel Black

MDEV-34437 restrict port and extra-port to tcp valid values

extra_port and port are 16 bit numbers and not 32 bit as they are
tcp ports.

Restrict their value.
parent 54b7a879
......@@ -957,7 +957,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Extra port number to use for tcp connections in a one-thread-per-connection manner. 0 means don't use another port
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
NUMERIC_MAX_VALUE 65535
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
......@@ -2777,7 +2777,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Port number to use for connection or 0 to default to, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306), whatever comes first
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
NUMERIC_MAX_VALUE 65535
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
......
......@@ -977,7 +977,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Extra port number to use for tcp connections in a one-thread-per-connection manner. 0 means don't use another port
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
NUMERIC_MAX_VALUE 65535
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
......@@ -2937,7 +2937,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Port number to use for connection or 0 to default to, my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default (3306), whatever comes first
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
NUMERIC_MAX_VALUE 65535
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
......
......@@ -2798,7 +2798,7 @@ static Sys_var_uint Sys_port(
#endif
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) "), whatever comes first",
READ_ONLY GLOBAL_VAR(mysqld_port), CMD_LINE(REQUIRED_ARG, 'P'),
VALID_RANGE(0, UINT_MAX32), DEFAULT(0), BLOCK_SIZE(1));
VALID_RANGE(0, UINT_MAX16), DEFAULT(0), BLOCK_SIZE(1));
static Sys_var_ulong Sys_preload_buff_size(
"preload_buffer_size",
......@@ -6244,7 +6244,7 @@ static Sys_var_uint Sys_extra_port(
"Extra port number to use for tcp connections in a "
"one-thread-per-connection manner. 0 means don't use another port",
READ_ONLY GLOBAL_VAR(mysqld_extra_port), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(0, UINT_MAX32), DEFAULT(0), BLOCK_SIZE(1));
VALID_RANGE(0, UINT_MAX16), DEFAULT(0), BLOCK_SIZE(1));
static Sys_var_on_access_global<Sys_var_ulong,
PRIV_SET_SYSTEM_GLOBAL_VAR_EXTRA_MAX_CONNECTIONS>
......
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