Commit 5e770b6
committed
Disable JDBC auto-commit on new connections
Oracle JDBC enforces JDBC 4.1 spec compliance since 12.1 (Bug
16063217): calling commit/rollback on a connection in AUTOCOMMIT
mode raises SQLException ("Could not commit/rollback with
auto-commit set on", surfaced as ORA-17273 in current 23ai
drivers). Earlier Oracle drivers silently no-op'd the call.
ruby-plsql calls commit/rollback explicitly throughout, so without
setAutoCommit(false) every commit/rollback errors out under modern
drivers and cascades into spec failures (cursors not closed, temp
tables not dropped, etc.).
Set setAutoCommit(false) explicitly after creating the raw JDBC
connection in JDBCConnection.create_raw and in the spec test
harness. This restores the long-standing behavior the gem relies on
and matches the workaround documented for ruby-plsql#121.
References:
- Oracle Database 12.1 Release Notes, Bug 16063217
https://docs.oracle.com/database/121/READM/chapter12101.htm#READM316
- ruby-plsql#121
#1211 parent adea17e commit 5e770b6
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
0 commit comments