1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-15 09:02:33 +03:00
Files
mariadb/mysql-test/r
unknown 05b709fc77 WL#1339 "Add per account max_user_connections limit (maximum number
of concurrent connections for the same account)"

Added support of account specific max_user_connections limit. Made all
user limits to be counted per account instead of the old behavior,
which was per user/host accounting. Added option which enables the old
behavior. Added testing of these to the test suite.

(After review version).


client/mysqltest.c:
  Extended mysqltest to be able to handle connect() statements for which
  error is expected.
  
  - Added replace_dynstr_append() utility function.
  - added connect_n_handle_errors() function which connects with server
    without retries and handles errors as if "connect" was usual
    statement.
  - do_connect(): added ability to handle connects which are expected
    to return an error.
  - run_query_normal(): Moved all expected-error-handling code to separate
    normal_handle_error()/normal_handle_no_error() functions to be able
    to reuse them in connect_n_handle_errors().
mysql-test/r/grant.result:
  Fixed test results since one more column to mysql.user was added.
mysql-test/r/system_mysql_db.result:
  Fixed test results since one more column to mysql.user was added.
scripts/mysql_create_system_tables.sh:
  Added max_user_connections column to mysql.user table for storing
  new maximal concurrent connections per account limit.
scripts/mysql_fix_privilege_tables.sql:
  Added max_user_connections column to mysql.user table for storing
  new maximal concurrent connections per account limit.
sql/lex.h:
  Added MAX_USER_CONNECTIONS symbol used for specifying
  maximum number of concurrent connections per account.
sql/mysql_priv.h:
  Added declaration of opt_old_style_user_limits variable which is defined
  in sql/mysqld.cc used in sql/sql_parse.cc.
sql/mysqld.cc:
  Added "old-style-user-limits" option which forces user limits to behave
  in old way i.e. to be counted per user/host pair instead of per account.
  Added comment describing mqh_used variable.
sql/set_var.cc:
  Added sys_var_max_user_conn class which implements support for the new 
  behavior of max_user_connections variable. Now the global instance of
  this variable holds default maximum number of concurrent connections per
  account (as it was before) and the session instance gives read-only
  access to account-specific version of this limit.
sql/set_var.h:
  Added sys_var_max_user_conn class which implements support for the new 
  behavior of max_user_connections variable. Now the global instance of
  this variable holds default maximum number of concurrent connections per
  account (as it was before) and the session instance gives read-only
  access to account-specific version of this limit.
sql/sql_acl.cc:
  Added support for account-specific MAX_USER_CONNECTIONS limit.
  Tweaked USER_RESOURCES and their handling for better clarity.
sql/sql_parse.cc:
  Added support for account-specific MAX_USER_CONNECTIONS (maximum number
  of concurrent connections per account) limit. Changed default behavior
  of all user limits to be per account instead of per user+host.
  '--old-style-user-limits' option was added to enable the old behavior.
  Made maximum number of connections per hour to be independant on the
  value of global max_user_connections variable.
sql/sql_yacc.yy:
  Added support of new MAX_USER_CONNECTIONS limit to grammar.
  Renamed USER_RESOURCES::connections member to conn_per_hour and bits
  member to specified_limits. Also enum is used instead of naked numbers
  when we are working with specified_limits.
sql/structs.h:
  USER_RESOURCES struct:
   - Added user_conn member to store the maximum number of concurrent 
     connections for an account. Renamed connections member to 
     conn_per_hour for less ambiguity.
   - Renamed member 'bits' to 'specified_limits' for the sake of clarity.
     The member was used as a flag indicating which limits were mentioned
     in GRANT clause.
   - Added comments.
  USER_CONN struct:
   - Removed unused user_len member.
   - Added comments.
2004-12-29 20:30:37 +03:00
..
2004-05-05 17:05:24 +03:00
2004-09-27 17:01:26 +02:00
2004-10-29 19:26:52 +03:00
2003-12-10 04:31:42 +00:00
2003-12-10 04:31:42 +00:00
2004-03-30 02:32:41 +03:00
2004-11-04 22:37:38 +01:00
2003-11-21 01:53:01 +02:00
2004-08-26 18:26:38 +03:00
2004-10-02 22:20:08 +03:00
2004-10-29 19:26:52 +03:00
2004-10-02 22:20:08 +03:00
2004-02-16 10:03:25 +02:00
2004-11-17 20:07:13 +01:00
2004-07-07 11:29:39 +03:00
2004-09-27 17:01:26 +02:00
2004-11-03 12:39:38 +02:00
2003-06-04 19:21:51 +03:00
2004-08-20 22:54:42 +02:00
2004-10-07 10:50:13 +03:00
2003-12-10 04:31:42 +00:00
2004-09-16 00:47:45 +06:00
2004-05-13 23:47:20 +03:00
2003-12-10 04:31:42 +00:00
2004-11-20 18:36:41 +01:00
2004-10-29 19:26:52 +03:00
2004-09-06 15:14:10 +03:00
2004-08-19 03:02:09 +02:00
2004-03-16 16:35:53 +01:00
2004-05-13 23:47:20 +03:00
2004-11-19 19:35:37 +04:00
2004-07-17 02:09:25 +03:00
2004-10-29 19:26:52 +03:00
2004-11-20 18:36:41 +01:00
2004-10-02 22:20:08 +03:00
2004-11-27 23:07:30 +01:00
2004-10-29 19:26:52 +03:00
2004-10-07 10:50:13 +03:00
2004-06-20 19:11:02 +02:00
2003-12-14 21:31:02 +01:00
2003-12-25 20:11:01 +04:00
2003-12-10 04:31:42 +00:00
2004-11-17 20:07:13 +01:00
2004-11-22 21:33:15 +01:00
2003-12-10 04:31:42 +00:00
2004-05-14 16:00:57 +02:00
2004-05-14 16:00:57 +02:00
2004-05-29 20:55:46 +04:00
2004-10-19 14:12:55 -07:00
2004-06-26 14:21:32 +02:00
2003-12-10 04:31:42 +00:00
2004-11-22 22:57:05 +01:00
2004-09-27 17:01:26 +02:00
2004-11-03 12:39:38 +02:00
2004-10-02 22:20:08 +03:00
2003-12-10 04:31:42 +00:00
2004-11-03 12:39:38 +02:00
2003-08-11 22:44:43 +03:00
2004-09-02 22:06:30 -07:00
2004-11-22 21:33:15 +01:00
2004-09-28 20:08:00 +03:00
2004-11-05 17:29:47 +02:00
2003-12-10 04:31:42 +00:00
2004-02-16 10:03:25 +02:00
2004-11-24 19:48:30 +02:00
2004-10-02 22:20:08 +03:00
2004-11-08 01:54:23 +02:00
2004-09-09 11:22:23 -05:00
2004-07-15 04:19:07 +03:00
2004-11-17 17:05:21 +01:00
2004-11-08 11:06:36 +01:00
2004-11-26 15:27:45 +00:00
2004-11-08 11:11:49 +01:00
2004-09-30 21:36:25 +00:00
2004-05-11 10:40:48 +02:00
2004-10-07 08:42:11 +00:00
2004-10-02 22:20:08 +03:00
2004-09-06 15:14:10 +03:00
2004-11-25 17:02:44 +01:00
2004-09-27 17:01:26 +02:00
2004-12-01 17:35:18 +00:00
2004-11-22 21:33:15 +01:00
2004-11-03 12:39:38 +02:00
2004-09-27 17:01:26 +02:00
2004-05-05 23:29:35 +03:00
2004-11-22 22:57:05 +01:00
2003-12-10 04:31:42 +00:00
2003-12-10 04:31:42 +00:00
2004-05-13 23:47:20 +03:00
2004-07-20 16:51:30 +02:00
2003-12-10 04:31:42 +00:00
2003-08-11 22:44:43 +03:00
2003-10-08 12:01:58 +03:00
2003-10-29 14:23:35 +01:00
2004-11-12 15:36:31 +02:00
2004-07-20 11:00:10 +02:00
2003-12-19 16:25:50 +02:00
2004-07-15 04:19:07 +03:00
2004-06-21 10:21:20 +03:00
2004-06-21 10:21:20 +03:00
2004-02-11 00:06:46 +01:00
2004-05-05 21:24:21 +03:00
2004-02-16 10:03:25 +02:00
2004-05-05 17:05:24 +03:00
2004-03-18 00:09:13 +02:00
2004-05-24 21:12:05 +04:00
2004-05-26 17:04:45 +02:00
2003-08-11 22:44:43 +03:00
2004-07-15 04:19:07 +03:00
2004-11-12 14:34:00 +02:00
2004-07-07 11:29:39 +03:00
2004-05-17 01:52:13 +03:00
2004-09-07 21:30:28 +02:00
2004-11-28 17:06:40 +01:00
2004-07-15 04:19:07 +03:00
2004-05-19 05:09:10 +03:00
2004-07-07 11:29:39 +03:00
2004-07-15 04:19:07 +03:00
2004-08-07 23:18:13 +02:00
2004-11-28 20:42:04 +01:00
2004-09-27 17:01:26 +02:00
2004-10-29 19:26:52 +03:00
2004-10-28 11:02:48 +03:00
2004-11-12 15:36:31 +02:00
2004-12-01 00:30:42 +01:00
2004-07-20 11:00:10 +02:00
2004-09-08 21:54:01 +03:00
2004-11-22 21:33:15 +01:00
2003-12-10 04:31:42 +00:00
2004-10-29 19:26:52 +03:00
2004-11-12 17:44:17 +02:00
2004-08-24 17:24:23 +02:00
2004-11-22 21:33:15 +01:00
2004-09-27 17:01:26 +02:00
2004-08-18 19:57:55 +02:00
2004-11-20 18:36:41 +01:00
2004-09-27 17:01:26 +02:00
2003-12-10 04:31:42 +00:00
2004-09-27 17:01:26 +02:00
2004-10-29 19:26:52 +03:00
2004-09-28 20:08:00 +03:00
2004-09-28 20:08:00 +03:00
2004-02-16 10:03:25 +02:00
2004-11-20 18:36:41 +01:00
2004-10-06 19:14:33 +03:00
2004-11-17 20:07:13 +01:00
2004-10-29 19:26:52 +03:00
2004-11-29 22:47:50 +01:00
2004-10-02 22:20:08 +03:00