You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we're in the process of upgrading our Oracle database from 12.2 to 19c. We've got a suite of ~7.000 Ruby tests that run fine against 12. Some fail against 19c.
I've traced the first issue down to how referenced data types in a procecdure specification are parsed.
OCIError:
ORA-06550: Zeile 4, Spalte 1:
PLS-00103: Fand das Symbol ")" als eines der folgenden erwartet wurde:
<an identifier> <a double-quoted delimited-identifier>
current delete exists prior
ORA-06550: Zeile 13, Spalte 0:
PLS-00103: Fand das Symbol "end-of-file" als eines der folgenden erwartet wurde:
end not pragma final instantiable persistable order
overriding static member constructor map
# stmt.c:267:in oci8lib_260.bundle
# /Users/jsg/.rvm/gems/ruby-2.6.3/gems/ruby-oci8-2.2.9/lib/oci8/cursor.rb:137:in `exec'
# /Users/jsg/.rvm/gems/ruby-2.6.3/gems/ruby-plsql-0.8.0/lib/plsql/oci_connection.rb:108:in `exec'
# /Users/jsg/.rvm/gems/ruby-2.6.3/gems/ruby-plsql-0.8.0/lib/plsql/procedure_call.rb:31:in `exec'
# /Users/jsg/.rvm/gems/ruby-2.6.3/gems/ruby-plsql-0.8.0/lib/plsql/procedure.rb:546:in `exec'
# /Users/jsg/.rvm/gems/ruby-2.6.3/gems/ruby-plsql-0.8.0/lib/plsql/package.rb:67:in `method_missing'
# ./spec/packages/m_logpack_spec.rb:203:in `block (4 levels) in <top (required)>'
Enabling debug output in procedure_call.rb:20 leads to:
I've tested a bit more. The problem seems to stem from the select statement against all_arguments (around line 220 in procedure.rb). If the data type of the argument is a public synonym (like utl_file.file_type), the select returns the wrong result.
I know too little about the big picture to fix this properly; I assume an intermediate lookup of the synonym needs to happen and argument_metadata should be populated with the resolved type owner and type name.
I've spent some more time with the library and fixed all issues that occured with our codebase. There were a couple of cases that @bpom didn't have to deal with, like package types declared as rowtypes, type references across schemas, and a few more.
Hello @bpom and @yahonda,
we're in the process of upgrading our Oracle database from 12.2 to 19c. We've got a suite of ~7.000 Ruby tests that run fine against 12. Some fail against 19c.
I've traced the first issue down to how referenced data types in a procecdure specification are parsed.
Concrete example:
Calling this procedure as
leads to
Enabling debug output in procedure_call.rb:20 leads to:
ruby-plsql generates a record type for
p_file
, which referencesutl_file.file_type
.When I change the reference to
sys.utl_file.file_type
, the procedure call works flawlessly. The resulting debug SQL:The text was updated successfully, but these errors were encountered: