mariadb/scripts
Michael Widenius 7800d93bc3 Allow one to block an account by using GRANT max_user_connections = -1
One can set @@global.max_user_connections to -1 to block anyone, except SUPER user, to login.
If max_user_connection is 0, one can't change it without a restart (needed to get user connections counting to work correctly)


mysql-test/r/system_mysql_db.result:
  Changed max_user_connections to handle negative numbers.
mysql-test/r/user_limits-2.result:
  New test case that one can't change max_user_connection if it was 0
mysql-test/r/user_limits.result:
  Fixed wrong error messages.
mysql-test/r/variables.result:
  Store / restore max_user_connections (needed as there is now a --master.opt file that changes it)
mysql-test/t/subselect_mat_cost-master.opt:
  Enable slow query log (as this test found some errors in slow query logging)
mysql-test/t/user_limits-2.test:
  New test case that one can't change max_user_connection if it was 0
mysql-test/t/user_limits-master.opt:
  Set max_user_connections (as one can't change it if it was 0)
mysql-test/t/user_limits.test:
  Test max_user_connections -1
mysql-test/t/variables-master.opt:
  Set max_user_connections (as one can't change it if it was 0)
mysql-test/t/variables.test:
  Set/restore max_user_connections
scripts/Makefile.am:
  Add a text message to mysql_fix_privilege_tables.sql that it's automaticly generated
scripts/mysql_system_tables.sql:
  Change max_user_connections to signed
scripts/mysql_system_tables_fix.sql:
  Change max_user_connections to signed
sql/item_func.cc:
  Change SHOW_INT to be signed.
  (Needed for max_user_connections and it's probably a bug that it was not originally signed)
sql/log.cc:
  Remove some code that was not needed (All these variables are reset at start of query)
sql/mysql_priv.h:
  Made max_user_connections signed.
  Added max_user_connections_checking
sql/mysqld.cc:
  Added max_user_connections_checking so that we know if max_user_connections was 0 at startup
  (Which means that we will not do connection counting for accounts that don't have user resource limits)
  Set thd->start_utime at same time as thr_create_utime. (Before start_utime could be < thr_create_utime which lead to wrong query counting)
sql/set_var.cc:
  Don't allow one to change 'max_user_connections' if it was 0 at startup.
sql/sql_acl.cc:
  Change user_connection counting to be negative.
sql/sql_connect.cc:
  If max_user_connections is < 0 then only SUPER user can login.
  Fixed wrong variable names for error messages.
  Fixed wrong initial value for questions.
  Set thd->start_utime and thd->thr_create_utime at startup.  Needed to get time_out_user_resource_limits() to work.
sql/sql_show.cc:
  SHOW_INT is now negative
sql/sql_yacc.yy:
  Support negative values for MAX_USER_CONNECTIONS
sql/structs.h:
  Make user connect counting work with signed numbers.
2011-09-26 20:26:47 +03:00
..
.cvsignore
CMakeLists.txt Added mytop to distribution (with some small trivial changes to make it workg good also for MariaDB) 2011-06-27 19:30:05 +03:00
comp_sql.c fix warning 2011-03-11 16:06:35 +01:00
convert-debug-for-diff.sh Trivial fixes, more safe DBUG_ASSERT()'s and some more DBUG_ 2010-08-23 12:52:57 +03:00
fill_help_tables.sql Merge with MySQL 5.1.55 2011-02-20 18:51:43 +02:00
make_binary_distribution.sh Added mytop to distribution (with some small trivial changes to make it workg good also for MariaDB) 2011-06-27 19:30:05 +03:00
make_sharedlib_distribution.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
make_win_bin_dist Added mytop to distribution (with some small trivial changes to make it workg good also for MariaDB) 2011-06-27 19:30:05 +03:00
Makefile.am Allow one to block an account by using GRANT max_user_connections = -1 2011-09-26 20:26:47 +03:00
msql2mysql.sh gen_lex_hash.cc: 2007-01-31 00:06:42 +01:00
mysql_config.pl.in We are now using Valgrind rather than purify, and have for quite some time. 2009-05-06 14:03:24 +02:00
mysql_config.sh We are now using Valgrind rather than purify, and have for quite some time. 2009-05-06 14:03:24 +02:00
mysql_convert_table_format.sh Don't do DBUG_ASSERT for checksum errors when using REPAIR 2011-01-07 17:58:12 +02:00
mysql_find_rows.sh Use /usr/bin/perl as standard Perl install path (bug#44643) 2009-05-09 23:43:48 +02:00
mysql_fix_extensions.sh - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
mysql_fix_privilege_tables.sh Ensure that all clients reads the appropriate 'client', client-mariadb and 'mariadb' sections from my.cnf 2011-03-18 17:03:43 +02:00
mysql_install_db.pl.in Merge with base 5.2 2011-03-23 19:22:38 +02:00
mysql_install_db.sh merge 2011-03-26 00:15:33 +01:00
mysql_secure_installation.pl.in Bug #54004 : mysql_secure_installation identifies "local host" incorrectly 2010-07-14 13:53:49 +03:00
mysql_secure_installation.sh Ensure that all clients reads the appropriate 'client', client-mariadb and 'mariadb' sections from my.cnf 2011-03-18 17:03:43 +02:00
mysql_setpermission.sh Merge 2010-12-29 00:47:05 +01:00
mysql_system_tables.sql Allow one to block an account by using GRANT max_user_connections = -1 2011-09-26 20:26:47 +03:00
mysql_system_tables_data.sql Merge 2010-12-29 00:47:05 +01:00
mysql_system_tables_fix.sql Allow one to block an account by using GRANT max_user_connections = -1 2011-09-26 20:26:47 +03:00
mysql_test_data_timezone.sql - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
mysql_zap.sh Merge up 5.0-build into 5.1-build: 2009-05-29 15:40:55 +02:00
mysqlaccess.conf
mysqlaccess.sh - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
mysqlbug.sh Fix test suite so that it works when doing configure --without-uca 2009-12-27 15:54:41 +02:00
mysqld_multi.sh Ensure that all clients reads the appropriate 'client', client-mariadb and 'mariadb' sections from my.cnf 2011-03-18 17:03:43 +02:00
mysqld_safe.sh Added --log-basename to mysqld to allow one to set the prefix for all logs with one command 2011-03-23 17:59:41 +02:00
mysqldumpslow.sh Ensure that all clients reads the appropriate 'client', client-mariadb and 'mariadb' sections from my.cnf 2011-03-18 17:03:43 +02:00
mysqlhotcopy.sh wl#173 - temporal types with sub-second resolution 2011-03-01 13:24:36 +01:00
mytop.sh Added progress reporting for alter table, LOAD DATA INFILE and for aria tables: check table, repair table, analyze table. 2011-07-01 15:08:30 +03:00