List:Internals« Previous MessageNext Message »
From:mmatthews Date:November 22 2005 5:07am
Subject:Connector/J commit: r4591 - in branches/branch_5_0/connector-j: . src/com/mysql/jdbc
View as plain text  
Modified:
   branches/branch_5_0/connector-j/CHANGES
   branches/branch_5_0/connector-j/src/com/mysql/jdbc/Connection.java
Log:
Fixed BUG#13775 - Extraneous sleep on autoReconnect. (merged from 3.1)

Modified: branches/branch_5_0/connector-j/CHANGES
===================================================================
--- branches/branch_5_0/connector-j/CHANGES	2005-11-22 05:04:07 UTC (rev 4590)
+++ branches/branch_5_0/connector-j/CHANGES	2005-11-22 05:07:28 UTC (rev 4591)
@@ -143,6 +143,8 @@
 	  statements from multiple threads sharing one connection.
 	  
 	- Fixed BUG#12230 -	logSlowQueries should give better info.
+	
+	- Fixed BUG#13775 - Extraneous sleep on autoReconnect.
       
 10-07-05 - Version 3.1.11
 

Modified: branches/branch_5_0/connector-j/src/com/mysql/jdbc/Connection.java
===================================================================
--- branches/branch_5_0/connector-j/src/com/mysql/jdbc/Connection.java	2005-11-22 05:04:07 UTC (rev 4590)
+++ branches/branch_5_0/connector-j/src/com/mysql/jdbc/Connection.java	2005-11-22 05:07:28 UTC (rev 4591)
@@ -2741,11 +2741,13 @@
 							break;
 						}
 
-						try {
-							Thread.sleep((long) timeout * 1000);
-							timeout = timeout * 2;
-						} catch (InterruptedException IE) {
-							;
+						if (attemptCount > 0) {
+							try {
+								Thread.sleep((long) timeout * 1000);
+								timeout = timeout * 2;
+							} catch (InterruptedException IE) {
+								;
+							}
 						}
 					} // end attempts for a single host
 				} // end iterator for list of hosts

Thread
Connector/J commit: r4591 - in branches/branch_5_0/connector-j: . src/com/mysql/jdbcmmatthews22 Nov