Skip to content

Commit 4a7fefc

Browse files
author
V S Murthy Sidagam
committed
WL#13229 Remove --old-style-user-limits
Removed the option Removed the tests which uses the option. Change-Id: I626c1f7d6d45dd13bd8695f34c3ee5932be1e911
1 parent 581f1f9 commit 4a7fefc

10 files changed

+6
-51
lines changed

mysql-test/r/mysqld--help-notwin.result

-6
Original file line numberDiff line numberDiff line change
@@ -747,11 +747,6 @@ The following options may be given as the first argument:
747747
--offline-mode Make the server into offline mode
748748
--old Use compatible behavior
749749
--old-alter-table Use old, non-optimized alter table
750-
--old-style-user-limits
751-
Enable old-style user limits (before 5.0.3, user
752-
resources were counted for each user + host vs. per
753-
account). This option is deprecated and will be removed
754-
in a future version.
755750
--open-files-limit=#
756751
If this is not 0, then mysqld will use this value to
757752
reserve file descriptors to use with setrlimit(). If this
@@ -1821,7 +1816,6 @@ no-dd-upgrade FALSE
18211816
offline-mode FALSE
18221817
old FALSE
18231818
old-alter-table FALSE
1824-
old-style-user-limits FALSE
18251819
optimizer-max-subgraph-pairs 100000
18261820
optimizer-prune-level 1
18271821
optimizer-search-depth 62

mysql-test/r/mysqld--help-win.result

-6
Original file line numberDiff line numberDiff line change
@@ -750,11 +750,6 @@ The following options may be given as the first argument:
750750
--offline-mode Make the server into offline mode
751751
--old Use compatible behavior
752752
--old-alter-table Use old, non-optimized alter table
753-
--old-style-user-limits
754-
Enable old-style user limits (before 5.0.3, user
755-
resources were counted for each user + host vs. per
756-
account). This option is deprecated and will be removed
757-
in a future version.
758753
--open-files-limit=#
759754
If this is not 0, then mysqld will use this value to
760755
reserve file descriptors to use with setrlimit(). If this
@@ -1833,7 +1828,6 @@ no-monitor FALSE
18331828
offline-mode FALSE
18341829
old FALSE
18351830
old-alter-table FALSE
1836-
old-style-user-limits FALSE
18371831
optimizer-max-subgraph-pairs 100000
18381832
optimizer-prune-level 1
18391833
optimizer-search-depth 62

mysql-test/r/mysqld_deprecated_options.result

-1
This file was deleted.

mysql-test/t/mysqld_deprecated_options-master.opt

-1
This file was deleted.

mysql-test/t/mysqld_deprecated_options.test

-16
This file was deleted.

sql/auth/sql_authentication.cc

+3-7
Original file line numberDiff line numberDiff line change
@@ -4489,13 +4489,9 @@ int acl_authenticate(THD *thd, enum_server_command command) {
44894489
acl_user->user_resource.conn_per_hour ||
44904490
acl_user->user_resource.user_conn ||
44914491
global_system_variables.max_user_connections) &&
4492-
get_or_create_user_conn(
4493-
thd,
4494-
(opt_old_style_user_limits ? sctx->user().str
4495-
: sctx->priv_user().str),
4496-
(opt_old_style_user_limits ? sctx->host_or_ip().str
4497-
: sctx->priv_host().str),
4498-
&acl_user->user_resource))
4492+
get_or_create_user_conn(thd, sctx->priv_user().str,
4493+
sctx->priv_host().str,
4494+
&acl_user->user_resource))
44994495
goto end; // The error is set by get_or_create_user_conn()
45004496

45014497
/*

sql/mysqld.cc

+1-10
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,7 @@ mysql_mutex_t LOCK_partial_revokes;
12941294
#if defined(ENABLED_DEBUG_SYNC)
12951295
MYSQL_PLUGIN_IMPORT uint opt_debug_sync_timeout = 0;
12961296
#endif /* defined(ENABLED_DEBUG_SYNC) */
1297-
bool opt_old_style_user_limits = false, trust_function_creators = false;
1297+
bool trust_function_creators = false;
12981298
bool check_proxy_users = false, mysql_native_password_proxy_users = false,
12991299
sha256_password_proxy_users = false;
13001300
/*
@@ -10861,12 +10861,6 @@ struct my_option my_long_options[] = {
1086110861
{"memlock", 0, "Lock mysqld in memory.", &locked_in_memory,
1086210862
&locked_in_memory, nullptr, GET_BOOL, NO_ARG, 0, 0, 0, nullptr, 0,
1086310863
nullptr},
10864-
{"old-style-user-limits", OPT_OLD_STYLE_USER_LIMITS,
10865-
"Enable old-style user limits (before 5.0.3, user resources were counted "
10866-
"for each user + host vs. per account). "
10867-
"This option is deprecated and will be removed in a future version.",
10868-
&opt_old_style_user_limits, &opt_old_style_user_limits, nullptr, GET_BOOL,
10869-
NO_ARG, 0, 0, 0, nullptr, 0, nullptr},
1087010864
{"port-open-timeout", 0,
1087110865
"Maximum time in seconds to wait for the port to become free. "
1087210866
"(Default: No wait).",
@@ -12669,9 +12663,6 @@ bool mysqld_get_one_option(int optid,
1266912663
"'--replica-parallel-workers=1'");
1267012664
}
1267112665
break;
12672-
case OPT_OLD_STYLE_USER_LIMITS:
12673-
push_deprecated_warn_no_replacement(nullptr, "--old-style-user-limits");
12674-
break;
1267512666
case OPT_SYNC_RELAY_LOG_INFO:
1267612667
LogErr(WARNING_LEVEL, ER_DEPRECATE_MSG_NO_REPLACEMENT,
1267712668
"--sync-relay-log-info");

sql/mysqld.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ extern bool opt_allow_suspicious_udfs;
220220
extern const char *opt_secure_file_priv;
221221
extern bool opt_log_slow_admin_statements, opt_log_slow_replica_statements;
222222
extern bool sp_automatic_privileges, opt_noacl;
223-
extern bool opt_old_style_user_limits, trust_function_creators;
223+
extern bool trust_function_creators;
224224
extern bool check_proxy_users, mysql_native_password_proxy_users,
225225
sha256_password_proxy_users;
226226
#ifdef _WIN32

sql/options_mysqld.h

-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ enum options_mysqld {
119119
OPT_REPLICA_PARALLEL_TYPE,
120120
OPT_SSL_SESSION_CACHE_TIMEOUT,
121121
OPT_REPLICA_PARALLEL_WORKERS,
122-
OPT_OLD_STYLE_USER_LIMITS,
123122
OPT_SYNC_RELAY_LOG_INFO,
124123
OPT_BINLOG_TRANSACTION_DEPENDENCY_TRACKING,
125124
OPT_CHARACTER_SET_CLIENT_HANDSHAKE,

sql/sql_connect.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ typedef struct user_conn {
7070
/*
7171
Pointer to user+host key (pair separated by '\0') defining the entity
7272
for which resources are counted (By default it is user account thus
73-
priv_user/priv_host pair is used. If --old-style-user-limits option
74-
is enabled, resources are counted for each user+host separately).
73+
priv_user/priv_host pair is used).
7574
*/
7675
char *user;
7776
/* Pointer to host part of the key. */

0 commit comments

Comments
 (0)