List:Commits« Previous MessageNext Message »
From:Horst Hunger Date:July 10 2008 2:03pm
Subject:bzr commit into mysql-5.1 branch (hhunger:2678) Bug#37997
View as plain text  
#At file:///work/bzr/5.1-user-conn/

 2678 Horst Hunger	2008-07-10
      Fix of bug#37997. Built in a polling until disconnect disappears from the processlist.
modified:
  mysql-test/r/max_user_connections_func.result
  mysql-test/t/max_user_connections_func.test

=== modified file 'mysql-test/r/max_user_connections_func.result'
--- a/mysql-test/r/max_user_connections_func.result	2008-04-10 13:14:28 +0000
+++ b/mysql-test/r/max_user_connections_func.result	2008-07-10 14:03:49 +0000
@@ -1,6 +1,6 @@
 ** Setup **
 
-SET @default_max_user_connections = @@max_user_connections;
+SET @default_max_user_connections = @@global.max_user_connections;
 Set Global max_user_connections=2;
 '#--------------------FN_DYNVARS_114_01-------------------------#'
 ** Connecting conn1 using username 'root' **
@@ -9,10 +9,11 @@ Set Global max_user_connections=2;
 ERROR 42000: User root already has more than 'max_user_connections' active connections
 Expected error "too many connections"
 ** Disconnecting conn1 **
+** Poll till disconnected conn1 disappears from processlist
 '#--------------------FN_DYNVARS_114_02-------------------------#'
 Set Global max_user_connections=3;
 ** Connecting conn5 using username 'root' **
 ** Connecting conn6 using username 'root' **
 ** Connection default **
 ** Disconnecting conn5, conn6 **
-SET GLOBAL max_user_connections = @default_max_user_connections;
+SET @@global.max_user_connections = @default_max_user_connections;

=== modified file 'mysql-test/t/max_user_connections_func.test'
--- a/mysql-test/t/max_user_connections_func.test	2008-04-11 19:59:33 +0000
+++ b/mysql-test/t/max_user_connections_func.test	2008-07-10 14:03:49 +0000
@@ -9,15 +9,18 @@
 #                                                                            #
 #                                                                            #
 # Creation Date: 2008-03-02                                                  #
-# Author:  Sharique Abdullah                                                     #
+# Author:  Sharique Abdullah                                                 #
 #                                                                            #
 # Description: Test Cases of Dynamic System Variable "max_user_connections   #
 #              that checks behavior of this variable in the following ways   #
 #              * Functionality based on different values                     #
 #                                                                            #
-#Reference:http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html
+# Reference:                                                                 #
+#    http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html     #
 # option_mysqld_max_user_connections                                         #
 #                                                                            #
+# Modified: 2008-07-10 HHUNGER: Inserted wait condition                      #
+#                                                                            #
 ##############################################################################
 
 --echo ** Setup **
@@ -28,8 +31,7 @@
 
 --source include/not_embedded.inc
 
-SET @default_max_user_connections = @@max_user_connections;
-
+SET @default_max_user_connections = @@global.max_user_connections;
 
 ###################################
 #Setting value max_user_connection#
@@ -37,13 +39,10 @@ SET @default_max_user_connections = @@ma
 
 Set Global max_user_connections=2;
 
-
-
 --echo '#--------------------FN_DYNVARS_114_01-------------------------#'
-#######################################
-#should not make more then 2 connection#
-#######################################
-
+########################################
+#Should not make more then 2 connection#
+########################################
 
 --echo ** Connecting conn1 using username 'root' **
 CONNECT (conn1,localhost,root,,);
@@ -61,22 +60,22 @@ CONNECT (conn3,localhost,root,,);
 --echo ** Disconnecting conn1 **
 DISCONNECT conn1;
 
-
-
+--echo ** Poll till disconnected conn1 disappears from processlist
+let $wait_condition= SELECT count(id) <= 2
+   FROM information_schema.processlist WHERE user = 'root';
+--source include/wait_condition.inc
 
 --echo '#--------------------FN_DYNVARS_114_02-------------------------#'
 #####################################################
-#set value to 3 and see if 3 connections can be made#
+#Set value to 3 and see if 3 connections can be made#
 #####################################################
 
-
 Set Global max_user_connections=3;
 --echo ** Connecting conn5 using username 'root' **
 CONNECT (conn5,localhost,root,,);
 --echo ** Connecting conn6 using username 'root' **
 CONNECT (conn6,localhost,root,,);
 
-
 #
 # Cleanup
 #
@@ -89,7 +88,5 @@ DISCONNECT conn2;
 DISCONNECT conn5;
 DISCONNECT conn6;
 
-SET GLOBAL max_user_connections = @default_max_user_connections;
+SET @@global.max_user_connections = @default_max_user_connections;
 
---disable_info
---enable_warnings

Thread
bzr commit into mysql-5.1 branch (hhunger:2678) Bug#37997Horst Hunger10 Jul