MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:mmatthews Date:April 3 2006 8:52pm
Subject:Connector/J commit: r5129 - in branches: branch_3_1/connector-j branch_3_1/connector-j/src/com/mysql/jdbc branch_3_1/connector-j/src/testsuite/regress...
View as plain text  
Modified:
   branches/branch_3_1/connector-j/CHANGES
   branches/branch_3_1/connector-j/src/com/mysql/jdbc/ResultSetMetaData.java
   branches/branch_3_1/connector-j/src/testsuite/regression/MetaDataRegressionTest.java
   branches/branch_5_0/connector-j/CHANGES
   branches/branch_5_0/connector-j/src/com/mysql/jdbc/ResultSetMetaData.java
   branches/branch_5_0/connector-j/src/testsuite/regression/MetaDataRegressionTest.java
   branches/branch_5_1/connector-j/CHANGES
   branches/branch_5_1/connector-j/src/com/mysql/jdbc/ResultSetMetaData.java
   branches/branch_5_1/connector-j/src/testsuite/regression/MetaDataRegressionTest.java
Log:
Fixed BUG#16277 - Invalid classname returned for 
	  RSMD.getColumnClassName() for BIGINT type.

Modified: branches/branch_3_1/connector-j/CHANGES
===================================================================
--- branches/branch_3_1/connector-j/CHANGES	2006-04-03 20:05:55 UTC (rev 5128)
+++ branches/branch_3_1/connector-j/CHANGES	2006-04-03 20:52:32 UTC (rev 5129)
@@ -93,6 +93,9 @@
 	- Fixed BUG#17450 - ResultSet.wasNull() not always reset
 	  correctly for booleans when done via conversion for server-side
 	  prepared statements.
+	  
+	- Fixed BUG#16277 - Invalid classname returned for 
+	  RSMD.getColumnClassName() for BIGINT type.
 	
 11-30-05 - Version 3.1.12
 

Modified: branches/branch_3_1/connector-j/src/com/mysql/jdbc/ResultSetMetaData.java
===================================================================
--- branches/branch_3_1/connector-j/src/com/mysql/jdbc/ResultSetMetaData.java	2006-04-03 20:05:55 UTC (rev 5128)
+++ branches/branch_3_1/connector-j/src/com/mysql/jdbc/ResultSetMetaData.java	2006-04-03 20:52:32 UTC (rev 5129)
@@ -699,7 +699,7 @@
 	
 		case Types.BIGINT:
 	
-			if (isUnsigned) {
+			if (!isUnsigned) {
 				return "java.lang.Long"; //$NON-NLS-1$
 			}
 	

Modified: branches/branch_3_1/connector-j/src/testsuite/regression/MetaDataRegressionTest.java
===================================================================
--- branches/branch_3_1/connector-j/src/testsuite/regression/MetaDataRegressionTest.java	2006-04-03 20:05:55 UTC (rev 5128)
+++ branches/branch_3_1/connector-j/src/testsuite/regression/MetaDataRegressionTest.java	2006-04-03 20:52:32 UTC (rev 5129)
@@ -1440,6 +1440,19 @@
 	}
 	
 	/**
+	 * Tests fix for BUG#16277 - Invalid classname returned for 
+	 * RSMD.getColumnClassName() for BIGINT type.
+	 * 
+	 * @throws Exception if the test fails.
+	 */
+	public void testBug16277() throws Exception {
+		createTable("testBug16277", "(field1 BIGINT, field2 BIGINT UNSIGNED)");
+		ResultSetMetaData rsmd = this.stmt.executeQuery("SELECT field1, field2 FROM testBug16277").getMetaData();
+		assertEquals("java.lang.Long", rsmd.getColumnClassName(1));
+		assertEquals("java.math.BigInteger", rsmd.getColumnClassName(2));
+	}
+	
+	/**
 	 * Tests fix for BUG#18554 - Aliased column names where
 	 * length of name > 251 are corrupted.
 	 * 

Modified: branches/branch_5_0/connector-j/CHANGES
===================================================================
--- branches/branch_5_0/connector-j/CHANGES	2006-04-03 20:05:55 UTC (rev 5128)
+++ branches/branch_5_0/connector-j/CHANGES	2006-04-03 20:52:32 UTC (rev 5129)
@@ -197,6 +197,9 @@
 	  correctly for booleans when done via conversion for server-side
 	  prepared statements.
 	
+	- Fixed BUG#16277 - Invalid classname returned for 
+	  RSMD.getColumnClassName() for BIGINT type.
+	  
 11-30-05 - Version 3.1.12
 
     - Fixed client-side prepared statement bug with embedded ? inside

Modified: branches/branch_5_0/connector-j/src/com/mysql/jdbc/ResultSetMetaData.java
===================================================================
--- branches/branch_5_0/connector-j/src/com/mysql/jdbc/ResultSetMetaData.java	2006-04-03 20:05:55 UTC (rev 5128)
+++ branches/branch_5_0/connector-j/src/com/mysql/jdbc/ResultSetMetaData.java	2006-04-03 20:52:32 UTC (rev 5129)
@@ -735,7 +735,7 @@
 
 		case Types.BIGINT:
 
-			if (isUnsigned) {
+			if (!isUnsigned) {
 				return "java.lang.Long"; //$NON-NLS-1$
 			}
 

Modified: branches/branch_5_0/connector-j/src/testsuite/regression/MetaDataRegressionTest.java
===================================================================
--- branches/branch_5_0/connector-j/src/testsuite/regression/MetaDataRegressionTest.java	2006-04-03 20:05:55 UTC (rev 5128)
+++ branches/branch_5_0/connector-j/src/testsuite/regression/MetaDataRegressionTest.java	2006-04-03 20:52:32 UTC (rev 5129)
@@ -1473,6 +1473,19 @@
 	}
 
 	/**
+	 * Tests fix for BUG#16277 - Invalid classname returned for 
+	 * RSMD.getColumnClassName() for BIGINT type.
+	 * 
+	 * @throws Exception if the test fails.
+	 */
+	public void testBug16277() throws Exception {
+		createTable("testBug16277", "(field1 BIGINT, field2 BIGINT UNSIGNED)");
+		ResultSetMetaData rsmd = this.stmt.executeQuery("SELECT field1, field2 FROM testBug16277").getMetaData();
+		assertEquals("java.lang.Long", rsmd.getColumnClassName(1));
+		assertEquals("java.math.BigInteger", rsmd.getColumnClassName(2));
+	}
+	
+	/**
 	 * Tests fix for BUG#18554 - Aliased column names where
 	 * length of name > 251 are corrupted.
 	 * 

Modified: branches/branch_5_1/connector-j/CHANGES
===================================================================
--- branches/branch_5_1/connector-j/CHANGES	2006-04-03 20:05:55 UTC (rev 5128)
+++ branches/branch_5_1/connector-j/CHANGES	2006-04-03 20:52:32 UTC (rev 5129)
@@ -198,6 +198,9 @@
 	- Fixed BUG#17450 - ResultSet.wasNull() not always reset
 	  correctly for booleans when done via conversion for server-side
 	  prepared statements.
+	  	
+	- Fixed BUG#16277 - Invalid classname returned for 
+	  RSMD.getColumnClassName() for BIGINT type.
 	
 11-30-05 - Version 3.1.12
 

Modified: branches/branch_5_1/connector-j/src/com/mysql/jdbc/ResultSetMetaData.java
===================================================================
--- branches/branch_5_1/connector-j/src/com/mysql/jdbc/ResultSetMetaData.java	2006-04-03 20:05:55 UTC (rev 5128)
+++ branches/branch_5_1/connector-j/src/com/mysql/jdbc/ResultSetMetaData.java	2006-04-03 20:52:32 UTC (rev 5129)
@@ -84,7 +84,7 @@
 	
 		case Types.BIGINT:
 	
-			if (isUnsigned) {
+			if (!isUnsigned) {
 				return "java.lang.Long"; //$NON-NLS-1$
 			}
 	

Modified: branches/branch_5_1/connector-j/src/testsuite/regression/MetaDataRegressionTest.java
===================================================================
--- branches/branch_5_1/connector-j/src/testsuite/regression/MetaDataRegressionTest.java	2006-04-03 20:05:55 UTC (rev 5128)
+++ branches/branch_5_1/connector-j/src/testsuite/regression/MetaDataRegressionTest.java	2006-04-03 20:52:32 UTC (rev 5129)
@@ -1402,6 +1402,19 @@
 		}
 	}
 	
+	/**
+	 * Tests fix for BUG#16277 - Invalid classname returned for 
+	 * RSMD.getColumnClassName() for BIGINT type.
+	 * 
+	 * @throws Exception if the test fails.
+	 */
+	public void testBug16277() throws Exception {
+		createTable("testBug16277", "(field1 BIGINT, field2 BIGINT UNSIGNED)");
+		ResultSetMetaData rsmd = this.stmt.executeQuery("SELECT field1, field2 FROM testBug16277").getMetaData();
+		assertEquals("java.lang.Long", rsmd.getColumnClassName(1));
+		assertEquals("java.math.BigInteger", rsmd.getColumnClassName(2));
+	}
+	
 	private void checkRsmdForBug13277(ResultSetMetaData rsmd) throws SQLException {
 		assertEquals(17, rsmd.getColumnDisplaySize(1)); // make sure we can call this methods w/o exc.
 		if (versionMeetsMinimum(4, 1)) {

Thread
Connector/J commit: r5129 - in branches: branch_3_1/connector-j branch_3_1/connector-j/src/com/mysql/jdbc branch_3_1/connector-j/src/testsuite/regress...mmatthews3 Apr