Page 1 of 1

Error on describing object parameters of stored procedures without GRANT

Posted: Mon 11 Dec 2006 18:38
by zzin32
For CoreLab team.

After installation last version 5.80.0.38
:(
By execute two time SQL.CreateProcCall of TOraSession code produces Access Violation, if procedure contains object type parameter (GRANTED) with sublevel object type (NOT GRANTED) argument.

Example:

1. connect as system user and execute:
CREATE USER TEST_GLB IDENTIFIED BY P1234;
GRANT CONNECT TO TEST_GLB;
GRANT CREATE TYPE TO TEST_GLB;
GRANT CREATE PUBLIC SYNONYM TO TEST_GLB;
GRANT CREATE PROCEDURE TO TEST_GLB;
CREATE USER TEST_INK IDENTIFIED BY P1234;
GRANT CONNECT TO TEST_INK;

2. Connect as TEST_GLB and execute

CREATE OR REPLACE TYPE TEST_T3SUB AS OBJECT(id varchar2(10));
CREATE OR REPLACE TYPE TEST_T3 AS OBJECT(
id number(10),
sid TEST_T3SUB
);
CREATE OR REPLACE PACKAGE TEST_PACK3 AS
PROCEDURE SET_DATA(PI_DATI TEST_T3);
END TEST_PACK3;
/
CREATE OR REPLACE PACKAGE BODY TEST_PACK3 AS
PROCEDURE SET_DATA(PI_DATI TEST_T3)
IS
BEGIN
NULL;
END SET_DATA;
END TEST_PACK3;
/
GRANT EXECUTE ON TEST_PACK3 TO TEST_INK;
GRANT EXECUTE ON TEST_T3 TO TEST_INK; -- !!!
--GRANT EXECUTE ON TEST_T3SUB TO TEST_INK; -- !!!

3. If from delphi execute (as user TEST_INK on TOraSession component)
OraSession1.SQL.CreateProcCall('TEST_GLB.TEST_PACK3.SET_DATA');
then receive error:
OCI-21700: object does not exists or is marked for delete
This is error, because TEST_T3SUB is not granted to user TEST_INK :)
4. If execute OraSession1.SQL.CreateProcCall('TEST_GLB.TEST_PACK3.SET_DATA');
again, then receive error:
"Access violation at address ..."

Please fixed this error

Oracle Database 10g Enterprise Edition Release 10.2.0.2.0
Delphi 6
ODAC 5.80.0.38 source code

Posted: Wed 13 Dec 2006 10:16
by Plash