Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.5.7
Description
{{ connection = dataSource.getConnection();
statement = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
<... >
result = statement.executeUpdate();
ResultSet rs = statement.getGeneratedKeys();
}}
rs.next() now throws java.sql.SQLException: Operation not permit on a closed resultSet.
This should not happen on first call to rs.next().
Bug introduced in 1.5.7, 1.5.6 behaves as it should with regards to this.
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
{{ connection = dataSource.getConnection();
statement = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); <... > result = statement.executeUpdate(); ResultSet rs = statement.getGeneratedKeys(); }} rs.next() now throws java.sql.SQLException: Operation not permit on a closed resultSet. This should not happen on first call to rs.next(). Bug introduced in 1.5.7, 1.5.6 behaves as it should with regards to this. asdfdasf |
{{ connection = dataSource.getConnection();
statement = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); <... > result = statement.executeUpdate(); ResultSet rs = statement.getGeneratedKeys(); }} rs.next() now throws java.sql.SQLException: Operation not permit on a closed resultSet. This should not happen on first call to rs.next(). Bug introduced in 1.5.7, 1.5.6 behaves as it should with regards to this. |
Summary | JDBC connector 1.5.7 (not 1.5.6): preparedStatement + getGeneratedKeys() = faulty exception on _first_ resultset.next() | JDBC connector 1.5.6+: preparedStatement + getGeneratedKeys() = faulty exception on _first_ resultset.next() |
Status | Open [ 1 ] | In Progress [ 3 ] |
Fix Version/s | 1.5.8 [ 22509 ] |
Component/s | Other [ 12201 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 79511 ] | MariaDB v4 [ 134950 ] |
could you post full stracktrace ? I fail to reproduced these issue
(try with this works well
@Test
}
prepStmt.executeUpdate();
ResultSet rs = prepStmt.getGeneratedKeys();
rs.next();
}
}
}