ALTER SESSION SET plsql_ccflags = 'use_index_by:TRUE'
Statement processed.
CREATE OR REPLACE PROCEDURE run_test
IS
TYPE my_type IS TABLE OF VARCHAR2(100)
$IF $$use_index_by $THEN INDEX BY PLS_INTEGER $END
;
my_array my_type;
BEGIN
DBMS_OUTPUT.PUT_LINE (my_array.COUNT);
END;
Procedure created.
BEGIN
run_test;
END;
0
ALTER SESSION SET plsql_ccflags = 'use_index_by:FALSE'
Statement processed.
ALTER PROCEDURE run_test
COMPILE
Procedure altered.
BEGIN
run_test;
END;
ORA-06531: Reference to uninitialized collection ORA-06512: at "SQL_HNWZVYXPAZZAGDFKMDTBNIUTF.RUN_TEST", line 9 ORA-06512: at line 2 ORA-06512: at "SYS.DBMS_SQL", line 1721More Details: https://docs.oracle.com/error-help/db/ora-06531