List:Commits« Previous MessageNext Message »
From:mark.matthews Date:March 2 2011 11:10pm
Subject:bzr push into connector-j/branches/branch_5_1 branch (mark.matthews:1044 to
1047)
View as plain text  
 1047 mark.matthews@stripped	2011-03-02
      Fix a findbugs warning.

    modified:
      src/com/mysql/jdbc/profiler/ProfilerEvent.java
 1046 mark.matthews@stripped	2011-03-02
      Testcase fixup.

    modified:
      src/testsuite/regression/StatementRegressionTest.java
 1045 mark.matthews@stripped	2011-03-02
      Remove bogus test.

    modified:
      src/testsuite/regression/DataSourceRegressionTest.java
 1044 mark.matthews@stripped	2011-03-02
      Address findbugs warnings in Statements et friends.

    modified:
      src/com/mysql/jdbc/CallableStatement.java
      src/com/mysql/jdbc/PreparedStatement.java
      src/com/mysql/jdbc/ServerPreparedStatement.java
      src/com/mysql/jdbc/StatementImpl.java
=== modified file 'src/com/mysql/jdbc/profiler/ProfilerEvent.java'
--- a/src/com/mysql/jdbc/profiler/ProfilerEvent.java	2010-08-18 18:30:33 +0000
+++ b/src/com/mysql/jdbc/profiler/ProfilerEvent.java	2011-03-02 23:09:55 +0000
@@ -299,7 +299,7 @@ public class ProfilerEvent {
 			pos += eventDurationUnits.length;
 		}
 		
-		int eventCreationPointIndex = readInt(buf, pos);
+		readInt(buf, pos);
 		pos += 4;
 		byte[] eventCreationAsBytes = readBytes(buf, pos);
 		pos += 4;
@@ -361,6 +361,7 @@ public class ProfilerEvent {
 			len += (4 + durationUnitsAsBytes.length);
 		} else {
 			len += 4;
+			durationUnitsAsBytes = "".getBytes("ISO8859_1");
 		}
 
 		byte[] buf = new byte[len];

=== modified file 'src/testsuite/regression/DataSourceRegressionTest.java'
--- a/src/testsuite/regression/DataSourceRegressionTest.java	2011-03-02 20:04:12 +0000
+++ b/src/testsuite/regression/DataSourceRegressionTest.java	2011-03-02 22:58:21 +0000
@@ -511,16 +511,4 @@ public class DataSourceRegressionTest ex
 		assertEquals("Connect timeout spec'd by URL didn't take", nonDefaultConnectTimeout, configuredConnectTimeout);
 		assertFalse("Connect timeout spec'd by URL didn't take", defaultConnectTimeout == configuredConnectTimeout);
 	}
-	
-	public void testBug54425() throws Exception {
-		MysqlConnectionPoolDataSource pds = new MysqlConnectionPoolDataSource();
-		pds.setUrl("jdbc:mysql://localhost/test?user=root&password=l00py123$");
-		
-		Connection c = pds.getPooledConnection().getConnection();
-		PreparedStatement pstmt = c.prepareStatement("SELECT 1");
-		pstmt.execute();
-		pstmt.close();
-		c.close();
-		
-	}
 }

=== modified file 'src/testsuite/regression/StatementRegressionTest.java'
--- a/src/testsuite/regression/StatementRegressionTest.java	2010-12-06 13:41:04 +0000
+++ b/src/testsuite/regression/StatementRegressionTest.java	2011-03-02 23:09:40 +0000
@@ -3270,7 +3270,7 @@ public class StatementRegressionTest ext
 				t.start();
 
 				try {
-					if (toBeKilledConn.isClosed()) {
+					if (!toBeKilledConn.isClosed()) {
 						initialTimeout *= 2;
 						continue;
 					}
@@ -3280,6 +3280,9 @@ public class StatementRegressionTest ext
 				} catch (BatchUpdateException batchEx) {
 					assertEquals("08003", batchEx.getSQLState());
 					break;
+				} catch (SQLException sqlEx) {
+					assertEquals("08003", sqlEx.getSQLState());
+					break;
 				}
 
 				fail("Connection didn't close while in the middle of PreparedStatement.executeBatch()");


Attachment: [text/bzr-bundle] bzr/mark.matthews@oracle.com-20110302230955-gzb8o19lnnply1ow.bundle
Thread
bzr push into connector-j/branches/branch_5_1 branch (mark.matthews:1044 to1047) mark.matthews3 Mar