Skip to content

Commit cf51357

Browse files
yahondaclaude
andcommitted
Avoid orphaning the outer session in the Oracle 9.2 nested describe
The "using Oracle 9.2" nested describe inside "Function with table indexed by binary integer parameter" called plsql.connect! in its before(:all) before checking the database version and skipping on 18c or higher. That call replaced the outer describe's connection with a fresh session; when skip fired the nested after(:all) was suppressed, but the outer after(:all) still ran on the new session. Its drop_session_ruby_temporary_tables therefore filtered by the new session_id and never touched the outer session's ruby_<outer_sid>_<package_id>_* tables, while the outer session itself was now leaked. Once that orphan session held its temporary tables in use, any later attempt to drop_all_ruby_temporary_tables hit ORA-14452. Drop the redundant plsql.connect! and check the version using the outer describe's existing connection. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9e311cf commit cf51357

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

spec/plsql/procedure_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,8 +1506,9 @@ def new_candidate(status)
15061506

15071507
describe "using Oracle 9.2" do
15081508
before(:all) do
1509-
# get actual database_version
1510-
plsql.connect! CONNECTION_PARAMS
1509+
# get actual database_version using the outer describe's connection;
1510+
# calling plsql.connect! here would orphan the outer session, leaking
1511+
# ruby_<outer_sid>_* temporary tables when this skip fires.
15111512
skip "Skip if the actual database version is 18c or higher" if (plsql.connection.database_version <=> [18, 0, 0, 0]) >= 0
15121513
end
15131514

0 commit comments

Comments
 (0)