Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Clear global temp tables before populating them with procedure parameters #18

Merged
merged 1 commit into from Apr 15, 2012

Conversation

Projects
None yet
2 participants

dlarson commented Aug 17, 2011

Raimonds,

This is the solution to Issue #10 which I entered last October. Here I have added
more testing for the various types of collections that could be passed to a package
procedure.

The global temp tables that hold collection parameters for packages need
to be cleared before they are populated rather than only after the
procedure or function completes. If something goes wrong in the execution
of the Oracle procedure, the global temp table for the parameter will not get
cleared after the call. This leaves behind garbage in the temp table that
will make the subsequent call to the same procedure wrong.

By putting tmp_table.delete right before populating tmp_table there is a
guarantee the no parameters from a previous function call will get passed
on to the current function call.

Dayle Larson Clear global temp tables before populating them with package procedur…
…e parameters

The global temp tables that hold collection parameters for packages need
to be cleared before they are populated rather than only after the
procedure or function completes. If something goes wrong in the execution
of the Oracle procedure, the global temp table for the parameter will not get
cleared after the call. This leaves behind garbage in the temp table that
will make the subsequent call to the same procedure wrong.

By putting tmp_table.delete right before populating tmp_table there is a
guarantee the no parameters from a previous function call will get passed
on to the current function call.
4aeb7d4

@rsim rsim added a commit that referenced this pull request Apr 15, 2012

@rsim rsim Merge pull request #18 from dlarson/clear_temp_table_params
Clear global temp tables before populating them with procedure parameters
5805ea8

@rsim rsim merged commit 5805ea8 into rsim:master Apr 15, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment