Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
None
-
None
-
None
Description
REPRO:
Statement stmt1 = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_UPDATABLE);
Statement stmt2 = conn.createStatement();
stmt1.executeUpdate("CREATE TABLE t1 (i int, c char(60))");
stmt1.executeUpdate("CREATE TABLE t2 (i int, c clob(1K))");
stmt1.executeUpdate("INSERT INTO t1 values (1, 'xx')");
stmt1.executeUpdate("INSERT INTO t2 values (1, 'yy')");
ResultSet rs1 = stmt1.executeQuery("SELECT * FROM t1");
ResultSet rs2 = stmt2.executeQuery("SELECT * FROM t2");
if (!rs1.next())
{ System.out.println("Row not found"); return; }if (!rs2.next()) { System.out.println("Row not found"); return; }
rs1.updateObject(2, rs2.getClob(2));
rs1.updateRow();
rs1.close();
rs1 = stmt1.executeQuery("SELECT * FROM t1");
if (!rs1.next()) { System.out.println("Row not found"); return; }
if (!rs2.getString(2).equals(rs1.getString(2)))
{ System.out.println("FAIL - wrong value for column 2 expected: " + rs2.getString(2) + " but was: " + rs1.getString(2)); } rs1.close();
rs2.close();
stmt1.close();
stmt2.close();
OUTPUT:
FAIL - wrong value for column 2 expected: yy but was: org.apache.derby.client.am.Clob@336d8196
Attachments
Attachments
Issue Links
- is part of
-
DERBY-2034 Tracking of bugs that lead to incorrect results being stored or returned to the client
- Closed