summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <dlenev@brandersnatch.localdomain>2005-01-20 00:54:01 +0300
committerunknown <dlenev@brandersnatch.localdomain>2005-01-20 00:54:01 +0300
commit1f6070a4b992a9e09ced0e3ec495e05f9e989fd5 (patch)
tree4f4ff97c5b4b9d78a131d1adb1230a438c496eb4 /mysql-test/r
parent628804d9348afdbe489d259de4ac625651a0c2ef (diff)
downloadmariadb-git-1f6070a4b992a9e09ced0e3ec495e05f9e989fd5.tar.gz
Fix for bug #7637: "Test failure: 'user_limits' on QNX and 64-bit systems"
Made user_limits.test scheduling independant (this solves failure on QNX). Made sys_var_max_user_conn variable int sized. Changed max_user_connections from ulong to uint to be able to use it in sys_var_max_user_conn::value_ptr() (solves failures on 64-bit platforms). mysql-test/r/user_limits.result: Made test scheduling independant. mysql-test/t/user_limits.test: Made test scheduling independant. sql/mysql_priv.h: Made max_user_connections to be the same size as USER_RESOURCES::user_conn (to be able to use them in sys_var_max_user_conn::value_ptr()). sql/mysqld.cc: Made max_user_connections to be the same size as USER_RESOURCES::user_conn (to be able to use them in sys_var_max_user_conn::value_ptr()). sql/set_var.cc: sys_var::item(): Added support for int system variables. sql/set_var.h: Made sys_var_max_user_conn to be int sized variable.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/user_limits.result7
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/r/user_limits.result b/mysql-test/r/user_limits.result
index b374b05e3f0..75062e97200 100644
--- a/mysql-test/r/user_limits.result
+++ b/mysql-test/r/user_limits.result
@@ -6,6 +6,7 @@ delete from mysql.tables_priv where user like 'mysqltest\_%';
delete from mysql.columns_priv where user like 'mysqltest\_%';
flush privileges;
grant usage on *.* to mysqltest_1@localhost with max_queries_per_hour 2;
+flush user_resources;
select * from t1;
i
select * from t1;
@@ -16,6 +17,7 @@ select * from t1;
ERROR 42000: User 'mysqltest_1' has exceeded the 'max_questions' 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;
select * from t1;
i
select * from t1;
@@ -34,6 +36,7 @@ select * from t1;
i
drop user mysqltest_1@localhost;
grant usage on *.* to mysqltest_1@localhost with max_connections_per_hour 2;
+flush user_resources;
select * from t1;
i
select * from t1;
@@ -47,6 +50,7 @@ ERROR 42000: User 'mysqltest_1' has exceeded the 'max_connections' resource (cur
drop user mysqltest_1@localhost;
flush privileges;
grant usage on *.* to mysqltest_1@localhost with max_user_connections 2;
+flush user_resources;
select * from t1;
i
select * from t1;
@@ -56,6 +60,7 @@ ERROR 42000: User 'mysqltest_1' has exceeded the 'max_user_connections' resource
select * from t1;
i
grant usage on *.* to mysqltest_1@localhost with max_user_connections 3;
+flush user_resources;
select * from t1;
i
connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK);
@@ -71,6 +76,7 @@ select @@session.max_user_connections, @@global.max_user_connections;
@@session.max_user_connections @@global.max_user_connections
2 2
grant usage on *.* to mysqltest_1@localhost;
+flush user_resources;
select @@session.max_user_connections, @@global.max_user_connections;
@@session.max_user_connections @@global.max_user_connections
2 2
@@ -79,6 +85,7 @@ i
connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK);
ERROR 42000: User mysqltest_1 already has more than 'max_user_connections' active connections
grant usage on *.* to mysqltest_1@localhost with max_user_connections 3;
+flush user_resources;
select @@session.max_user_connections, @@global.max_user_connections;
@@session.max_user_connections @@global.max_user_connections
3 2