diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-11-22 18:04:38 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-11-22 18:04:38 +0100 |
commit | d2755a2c9c109ddb4e2e0c9feda89431a6c4fd50 (patch) | |
tree | c6e4678908c750d7f558e98cedc349aa1d350892 /mysql-test/r/user_limits.result | |
parent | af32b02c06f32a89dc9f52e556bc5dd3bf49c19e (diff) | |
parent | 42221abaed700f6dc5d280b462755851780e8487 (diff) | |
download | mariadb-git-d2755a2c9c109ddb4e2e0c9feda89431a6c4fd50.tar.gz |
5.3->5.5 merge
Diffstat (limited to 'mysql-test/r/user_limits.result')
-rw-r--r-- | mysql-test/r/user_limits.result | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/mysql-test/r/user_limits.result b/mysql-test/r/user_limits.result index 80ec5517b16..688704f528a 100644 --- a/mysql-test/r/user_limits.result +++ b/mysql-test/r/user_limits.result @@ -1,3 +1,4 @@ +set @my_max_user_connections= @@global.max_user_connections; drop table if exists t1; create table t1 (i int); delete from mysql.user where user like 'mysqltest\_%'; @@ -12,9 +13,9 @@ i select * from t1; i select * from t1; -ERROR 42000: User 'mysqltest_1' has exceeded the 'max_questions' resource (current value: 2) +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_queries_per_hour' resource (current value: 2) select * from t1; -ERROR 42000: User 'mysqltest_1' has exceeded the 'max_questions' resource (current value: 2) +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_queries_per_hour' resource (current value: 2) drop user mysqltest_1@localhost; grant usage on *.* to mysqltest_1@localhost with max_updates_per_hour 2; flush user_resources; @@ -27,11 +28,11 @@ i delete from t1; delete from t1; delete from t1; -ERROR 42000: User 'mysqltest_1' has exceeded the 'max_updates' resource (current value: 2) +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_updates_per_hour' resource (current value: 2) select * from t1; i delete from t1; -ERROR 42000: User 'mysqltest_1' has exceeded the 'max_updates' resource (current value: 2) +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_updates_per_hour' resource (current value: 2) select * from t1; i drop user mysqltest_1@localhost; @@ -65,10 +66,20 @@ select * from t1; i connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK); ERROR 42000: User 'mysqltest_1' has exceeded the 'max_user_connections' resource (current value: 3) +grant usage on *.* to mysqltest_1@localhost with max_user_connections -1; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_USER_CONNECTIONS -1 +flush user_resources; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_USER_CONNECTIONS -1 +connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK); +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_user_connections' resource (current value: -1) drop user mysqltest_1@localhost; select @@session.max_user_connections, @@global.max_user_connections; @@session.max_user_connections @@global.max_user_connections -0 0 +1000 1000 set session max_user_connections= 2; ERROR HY000: SESSION variable 'max_user_connections' is read-only. Use SET GLOBAL to assign the value set global max_user_connections= 2; @@ -92,5 +103,21 @@ select @@session.max_user_connections, @@global.max_user_connections; connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK); ERROR 42000: User 'mysqltest_1' has exceeded the 'max_user_connections' resource (current value: 3) set global max_user_connections= 0; +grant usage on *.* to mysqltest_1@localhost with max_user_connections 0; +set global max_user_connections=-1; +show variables like "max_user_user_connections"; +Variable_name Value +select @@max_user_connections; +@@max_user_connections +-1 +select @@global.max_user_connections; +@@global.max_user_connections +-1 +connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK); +ERROR 42000: User mysqltest_1 already has more than 'max_user_connections' active connections +set global max_user_connections=1; +connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK); +ERROR 42000: User mysqltest_1 already has more than 'max_user_connections' active connections drop user mysqltest_1@localhost; drop table t1; +set global max_user_connections= @my_max_user_connections; |