IGNITE-28649 Support JDBC API for savepoint#13112
Conversation
|
what about JdbcThinFeature and correct before\after savepoint jdbc vs old\new savepoint cluster correct handling tests ? |
| stmt.executeUpdate("UPDATE Person SET name = 'Jane' WHERE id = 1"); | ||
|
|
||
| conn.rollback(savepoint); | ||
| conn.releaseSavepoint(savepoint); |
There was a problem hiding this comment.
from this example is not clear - what was the final state of row name where id = 1, can you extend this test plz ? I suppose pure java: assert expectation would be enough here
There was a problem hiding this comment.
Added a check that it is not possible to roll back on an already rolled back savepoint.
| * `Connection.releaseSavepoint(Savepoint savepoint)` | ||
|
|
||
| Savepoints are available for JDBC connections that use the Calcite-based SQL engine and explicit `PESSIMISTIC` transactions. | ||
| Disable auto-commit before creating a savepoint. |
There was a problem hiding this comment.
Added note:
If auto-commit remains enabled, JDBC savepoint API calls that require an explicit transaction fail with SQLException.
|
|
||
| assertQuery(conn, 1, "before_sp1"); | ||
|
|
||
| conn.releaseSavepoint(sp1); |
There was a problem hiding this comment.
plz append additional test, from java doc : java.sql.Connection#releaseSavepoint
Any reference to the savepoint after it have been removed will cause an SQLException to be thrown.
thus test like :
Savepoint sp1 = conn.setSavepoint("sp1");
conn.releaseSavepoint(sp1);
conn.rollback(sp1);
need to fail correctly
Probably test org.apache.ignite.jdbc.thin.JdbcThinConnectionSelfTest#testReleaseSavepoint
need to be expanded, i see only null and fake = not exist safePoints been checked there
|



https://issues.apache.org/jira/browse/IGNITE-28649