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
{{ message }}
Repository navigation
invalid identifier error thrown when using "join_by" #770
CREATE OR REPLACE PACKAGE test_join_by IS
--%suite
--%test
PROCEDURE p;
END test_join_by;
/
CREATE OR REPLACE PACKAGE BODY test_join_by IS
PROCEDURE p IS
l_actual sys_refcursor;
l_expected sys_refcursor;
BEGIN
OPEN l_actual FOR
SELECT 1 AS PK,
'hello' AS text
FROM DUAL;
OPEN l_expected FOR
SELECT 1 AS PK,
'hello' AS text
FROM DUAL;
ut.expect(l_actual).to_equal(l_expected)
.join_by('PK');
END p;
END test_join_by;
/
SET SERVEROUTPUT ON SIZE UNLIMITED
EXECUTE ut.run('TEST_JOIN_BY');
When running as user SCOTT I get the following output:
Package TEST_JOIN_BY compiled
Package Body TEST_JOIN_BY compiled
test_join_by
p [.063 sec] (FAILED - 1)
Failures:
1) p
ORA-00904: "UT3_LATEST_RELEASE"."UT_COMPOUND_DATA_HELPER"."GET_HASH": invalid identifier
ORA-06512: at "UT3_LATEST_RELEASE.UT_COMPOUND_DATA_VALUE", line 235
ORA-06512: at "UT3_LATEST_RELEASE.UT_DATA_VALUE_REFCURSOR", line 251
ORA-06512: at "UT3_LATEST_RELEASE.UT_EQUAL", line 236
ORA-06512: at "UT3_LATEST_RELEASE.UT_EXPECTATION", line 24
ORA-06512: at "UT3_LATEST_RELEASE.UT_EXPECTATION_COMPOUND", line 189
ORA-06512: at "SCOTT.TEST_JOIN_BY", line 17
ORA-06512: at "UT3_LATEST_RELEASE.UT_COMPOUND_DATA_VALUE", line 235
ORA-06512: at "UT3_LATEST_RELEASE.UT_DATA_VALUE_REFCURSOR", line 251
ORA-06512: at "UT3_LATEST_RELEASE.UT_EQUAL", line 236
ORA-06512: at "UT3_LATEST_RELEASE.UT_EXPECTATION", line 24
ORA-06512: at "UT3_LATEST_RELEASE.UT_EXPECTATION_COMPOUND", line 189
ORA-06512: at "SCOTT.TEST_JOIN_BY", line 17
ORA-06512: at line 6
Finished in .065898 seconds
1 tests, 0 failed, 1 errored, 0 disabled, 0 warning(s)
PL/SQL procedure successfully completed.
Works when running as ut3, ut3_latest_release or ut3_tester.
It will be same. @lwasylow, I think the merge statement should be moved from ut_compund_data_value into a helper package that runs as authid definer. The same with the insert statement below it.
That way we don't need to worry about exposing (granting) internal elements of framework to public/users.
Activity
jgebal commentedon Oct 27, 2018
Is it the same on develop version?
PhilippSalvisberg commentedon Oct 27, 2018
not tested.
PhilippSalvisberg commentedon Oct 27, 2018
Quick fix
GRANT EXECUTE ON "UT3_LATEST_RELEASE"."UT_COMPOUND_DATA_HELPER" TO PUBLIC;jgebal commentedon Oct 27, 2018
It will be same.
@lwasylow, I think the merge statement should be moved from ut_compund_data_value into a helper package that runs as authid definer. The same with the insert statement below it.
That way we don't need to worry about exposing (granting) internal elements of framework to public/users.
jgebal commentedon Oct 27, 2018
Quick fix was my initial thought too. It's not a clean solution though.
lwasylow commentedon Oct 27, 2018
Will look onto that
Fix to issue #770 when the merge statement is run via current user wh…
Fix to issue #770 when the merge statement is run via current user wh…
jgebal commentedon Nov 17, 2018
Closing as it's fixed by #773