too many warnings hides error?

Worker

Member³
When I try to compile the package below in a program window, I expect it to fail due to "x" not being a defined variable.

What happens is I see "compiled with errors" in the status bar but no errors show up, only lots of PLW-07204 warnings. Also when I right-click "Recompile" the package from the Object Browser, it tells me it was successful when it really wasn't.

If I reduce the number of warnings by making the cursor smaller, then compiling suddenly gives the expected result.

Code:
create or replace package body PKG is

CURSOR c
IS
	SELECT	1
	FROM	DUAL
	WHERE	TRUNC(SYSTIMESTAMP) = TRUNC(SYSTIMESTAMP)
	AND	TRUNC(SYSTIMESTAMP) = TRUNC(SYSTIMESTAMP)
	AND	TRUNC(SYSTIMESTAMP) = TRUNC(SYSTIMESTAMP)
	AND	TRUNC(SYSTIMESTAMP) = TRUNC(SYSTIMESTAMP)
	AND	TRUNC(SYSTIMESTAMP) = TRUNC(SYSTIMESTAMP)
	AND	TRUNC(SYSTIMESTAMP) = TRUNC(SYSTIMESTAMP)
	AND	TRUNC(SYSTIMESTAMP) = TRUNC(SYSTIMESTAMP)
	AND	TRUNC(SYSTIMESTAMP) = TRUNC(SYSTIMESTAMP)
	AND	TRUNC(SYSTIMESTAMP) = TRUNC(SYSTIMESTAMP)
	AND	TRUNC(SYSTIMESTAMP) = TRUNC(SYSTIMESTAMP)
	AND	TRUNC(SYSTIMESTAMP) = TRUNC(SYSTIMESTAMP)
	AND	TRUNC(SYSTIMESTAMP) = TRUNC(SYSTIMESTAMP);

PROCEDURE p
IS
BEGIN

	x := 1;

END;

END;

 
Can you run the following query and check if it contains any errors, or just the warnings?

Code:
select * from user_errors
 where name = 'PKG'
   and type = 'PACKAGE BODY'
 order by sequence

For me it only contained the warnings, so I guess this an Oracle Server issue.
 
Last edited:
Yeah that query only returns warnings, not errors. That's unfortunate because Oracle Server bugs are a lot harder to get fixed.
 
Back
Top