-
Notifications
You must be signed in to change notification settings - Fork 186
DDL Trigger not working #1088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@Sartograph Steps I used to reproduce: create user APPS IDENTIFIED BY APPS;
GRANT CONNECT, RESOURCE, select any table, execute any procedure, SELECT ANY DICTIONARY TO APPS;
conn apps/apps@127.0.0.1:1521/xe
CREATE OR REPLACE PACKAGE apps.xxpk_ut_test
AUTHID DEFINER
AS
-- %suite(xxpk_ut_test)
-- %test(just testing)
PROCEDURE t_ut_test;
END xxpk_ut_test;
/
CREATE OR REPLACE PACKAGE BODY apps.xxpk_ut_test
AS
PROCEDURE t_ut_test
IS
BEGIN
NULL;
END;
END xxpk_ut_test;
/
select object_owner, max(parse_time)
from ut3.ut_annotation_cache_info
group by object_owner;
select *
from ut3.ut_annotation_cache_info
where object_owner = 'APPS';
set serverout on
call ut.run('xxpk_ut_test');
|
Do we just need to drop/disable the DDL trigger? |
Dropping or disabling trigger will do the trick. |
I've investigated the issue and found the root cause. It seems that DBMS_PREPROCESSOR doesn't accept source code with schema name in it. Thanks for reporting this issue. I'm working on a fix now. |
After further investigation. It seems that it only occurs when AUTHID is also used. So it's a bit of an edge case, where DBMS_PREPROCESSOR: Works fine if source line is like:
|
Resolves #1088 Changed tests to reproduce issue with `dbms_preprocessor` failing to parse source that start with: `package owner.name authid definer is ...`
Even more, it seems that this issue only appears on Oracle 11g. In the mean time, I've added a workaround/fix for the problem in our code. |
For information. v3.1.10.3349 |
Hey @VladDr85 , can you offer detailed instructions how you reproduce the problem you're experiencing on 19c? |
@pesse utPLSQL is installed without a trigger, after it is installed "install_headless_with_trigger.sql"
Run
trigger
I'm changing the test, but I won't perform it yet Вот как-то так |
For information: ut3.ut_annotation_manager
|
Hi @VladDr85 |
Describe the bug
utPLSQL was installed with DDL trigger. However, when creating new tests or updating tests, the trigger does not update the annotation cache. ut.run() does not update the cache either, because the DDL trigger is installed. We have to manually run ut_runner.rebuild_annotation_cache() to make any new tests available.
Provide version info
Information about utPLSQL and Database version,
Information about client software
What client was used to run utPLSQL tests?
--> SQLDeveloper
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When the DDL trigger is installed and active, new test objects should automatically be recognized and part of the tests. No need to manully rebuild the cache.
Example code
Additional context
Installation:
The text was updated successfully, but these errors were encountered: