List:Commits« Previous MessageNext Message »
From:mmatthews Date:March 1 2007 10:00pm
Subject:Connector/J commit: r6336 - branches/branch_5_0/connector-j branches/branch_5_0/connector-j/src/com/mysql/jdbc trunk/connector-j trunk/connector-j/src...
View as plain text  
Modified:
   branches/branch_5_0/connector-j/CHANGES
   branches/branch_5_0/connector-j/src/com/mysql/jdbc/BlobFromLocator.java
   trunk/connector-j/CHANGES
   trunk/connector-j/src/com/mysql/jdbc/BlobFromLocator.java
Log:
	- Fixed BUG#26592 - PreparedStatement is not closed in 
	  BlobFromLocator.getBytes().

Modified: branches/branch_5_0/connector-j/CHANGES
===================================================================
--- branches/branch_5_0/connector-j/CHANGES	2007-03-01 21:19:38 UTC (rev 6335)
+++ branches/branch_5_0/connector-j/CHANGES	2007-03-01 22:00:26 UTC (rev 6336)
@@ -6,7 +6,10 @@
 	- Fixed BUG#25545 - Client options not sent correctly when using SSL,
 	  leading to stored procedures not being able to return results. Thanks
 	  to Don Cohen for the bug report, testcase and patch.
-	  
+
+	- Fixed BUG#26592 - PreparedStatement is not closed in 
+	  BlobFromLocator.getBytes().
+	   	  
 03-01-07 - Version 5.0.5
 
     - Fixed BUG#23645 - Some collations/character sets reported as "unknown"

Modified: branches/branch_5_0/connector-j/src/com/mysql/jdbc/BlobFromLocator.java
===================================================================
--- branches/branch_5_0/connector-j/src/com/mysql/jdbc/BlobFromLocator.java	2007-03-01 21:19:38 UTC (rev 6335)
+++ branches/branch_5_0/connector-j/src/com/mysql/jdbc/BlobFromLocator.java	2007-03-01 22:00:26 UTC (rev 6336)
@@ -271,7 +271,6 @@
 	 *             if a database error occurs
 	 */
 	public byte[] getBytes(long pos, int length) throws SQLException {
-		java.sql.ResultSet blobRs = null;
 		java.sql.PreparedStatement pStmt = null;
 
 		try {
@@ -280,14 +279,14 @@
 
 			return getBytesInternal(pStmt, pos, length);
 		} finally {
-			if (blobRs != null) {
+			if (pStmt != null) {
 				try {
-					blobRs.close();
+					pStmt.close();
 				} catch (SQLException sqlEx) {
 					; // do nothing
 				}
 
-				blobRs = null;
+				pStmt = null;
 			}
 		}
 	}

Modified: trunk/connector-j/CHANGES
===================================================================
--- trunk/connector-j/CHANGES	2007-03-01 21:19:38 UTC (rev 6335)
+++ trunk/connector-j/CHANGES	2007-03-01 22:00:26 UTC (rev 6336)
@@ -11,6 +11,9 @@
 	  leading to stored procedures not being able to return results. Thanks
 	  to Don Cohen for the bug report, testcase and patch.
 	  
+	- Fixed BUG#26592 - PreparedStatement is not closed in 
+	  BlobFromLocator.getBytes().
+	  	  
 03-01-07 - Version 5.0.5
 
     - Fixed BUG#23645 - Some collations/character sets reported as "unknown"

Modified: trunk/connector-j/src/com/mysql/jdbc/BlobFromLocator.java
===================================================================
--- trunk/connector-j/src/com/mysql/jdbc/BlobFromLocator.java	2007-03-01 21:19:38 UTC (rev 6335)
+++ trunk/connector-j/src/com/mysql/jdbc/BlobFromLocator.java	2007-03-01 22:00:26 UTC (rev 6336)
@@ -273,7 +273,6 @@
 	 *             if a database error occurs
 	 */
 	public byte[] getBytes(long pos, int length) throws SQLException {
-		java.sql.ResultSet blobRs = null;
 		java.sql.PreparedStatement pStmt = null;
 
 		try {
@@ -282,18 +281,18 @@
 
 			return getBytesInternal(pStmt, pos, length);
 		} finally {
-			if (blobRs != null) {
+			if (pStmt != null) {
 				try {
-					blobRs.close();
+					pStmt.close();
 				} catch (SQLException sqlEx) {
 					; // do nothing
 				}
 
-				blobRs = null;
+				pStmt = null;
 			}
 		}
 	}
-
+	
 	/**
 	 * Returns the number of bytes in the BLOB value designated by this Blob
 	 * object.

Thread
Connector/J commit: r6336 - branches/branch_5_0/connector-j branches/branch_5_0/connector-j/src/com/mysql/jdbc trunk/connector-j trunk/connector-j/src...mmatthews1 Mar