OS: Windows 2003 Server
Oracle9.2.0.1
Symptom: When you compile PL/SQL functions with DEBUG, a crash occurs. The details are as follows:
The following is a function:
SQL> create or replace function A2 (arg_bh User_Tables.table_name % type)
2 return number is
3 Result VARCHAR2 (50 );
4 begin
5 select arg_bh | rpad (arg_bh, 46) | '(TEST)' into Result from dual;
6 end A2;
7/
Function created
SQL> alter function a2 compile;
Function altered
SQL> alter function a2 compile debug;
Then there was a database crash, CPU100 %
Session processing waiting status. The waiting event is a null event.
The following system tables are locked.
Sys error $
Sys procedureinfo $
Sys argument $
Sys procedurec $
Sys procedurejava $
Sys vtable $
Sys procedure $
SYS IDL_UB1 $
SYS IDL_CHAR $
SYS IDL_UB2 $
SYS IDL_SB4 $
KILL cannot KILL the process. The process is always in the killed state. You can KILL the process by running the orakill command.
I did some tests and found that the main problem was caused by the following code snippets:
Arg_bh User_Tables.table_name % type
Arg_bh | rpad (arg_bh, 46) | '(TEST )'
In database 9.2.0.7, the same code is compiled normally, indicating that this is a BUG in 9.2.0.1. I do not know which version to fix. Therefore, we recommend that you upgrade it to a higher version during development.