Modified:
branches/branch_5_0/connector-j/CHANGES
branches/branch_5_0/connector-j/src/testsuite/regression/ResultSetRegressionTest.java
Log:
Merge of test for BUG#16169 (fix was already present) from 3.1 branch.
Modified: branches/branch_5_0/connector-j/CHANGES
===================================================================
--- branches/branch_5_0/connector-j/CHANGES 2006-01-05 00:14:09 UTC (rev 4773)
+++ branches/branch_5_0/connector-j/CHANGES 2006-01-05 00:22:46 UTC (rev 4774)
@@ -1,7 +1,7 @@
# Changelog
# $Id$
-11-04-05 - Version 5.0.0-beta
+12-23-05 - Version 5.0.0-beta
- XADataSource implemented (ported from 3.2 branch which won't be
released as a product). Use
@@ -87,7 +87,7 @@
cancelled due to timeout expiration and have it throw the exception
instead.
-xx-xx-05 - Version 3.1.13
+xx-xx-06 - Version 3.1.13
- Fixed BUG#15464 - INOUT parameter does not store IN value.
@@ -109,9 +109,11 @@
- Fixed BUG#15854 - DBMD.getColumns() returns wrong type for BIT.
+ - Fixed BUG#16169 - ResultSet.getNativeShort() causes stack overflow error
+ via recurisve calls.
+
11-30-05 - Version 3.1.12
-
- Fixed client-side prepared statement bug with embedded ? inside
quoted identifiers (it was recognized as a placeholder, when it
was not).
Modified: branches/branch_5_0/connector-j/src/testsuite/regression/ResultSetRegressionTest.java
===================================================================
--- branches/branch_5_0/connector-j/src/testsuite/regression/ResultSetRegressionTest.java 2006-01-05 00:14:09 UTC (rev 4773)
+++ branches/branch_5_0/connector-j/src/testsuite/regression/ResultSetRegressionTest.java 2006-01-05 00:22:46 UTC (rev 4774)
@@ -2848,4 +2848,39 @@
}
}
}
+
+ /**
+ * Tests fix for BUG#16169 - ResultSet.getNativeShort() causes stack
+ * overflow error via recurisve calls.
+ *
+ * @throws Exception if the tests fails
+ */
+ public void testBug16169() throws Exception {
+ createTable("testBug16169", "(field1 smallint)");
+
+ try {
+
+ this.stmt
+ .executeUpdate("INSERT INTO testBug16169 (field1) VALUES (0)");
+
+ this.pstmt = this.conn
+ .prepareStatement("SELECT * FROM testBug16169");
+ this.rs = this.pstmt.executeQuery();
+ assertTrue(this.rs.next());
+
+ assertEquals(0, ((Integer) rs.getObject("field1")).intValue());
+ } finally {
+ if (this.rs != null) {
+ ResultSet toCloseRs = this.rs;
+ this.rs = null;
+ toCloseRs.close();
+ }
+
+ if (this.pstmt != null) {
+ PreparedStatement toCloseStmt = this.pstmt;
+ this.pstmt = null;
+ toCloseStmt.close();
+ }
+ }
+ }
}
| Thread |
|---|
| • Connector/J commit: r4774 - in branches/branch_5_0/connector-j: . src/testsuite/regression | mmatthews | 5 Jan |