-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Rule G-4350 (Always use 1 as lower and COUNT() as upper bound when looping through a dense array) is wrongly reported in the following code:
begin
FOR r_obj IN (
SELECT obj.object_type, obj.object_name, count(dep.name) cnt
FROM user_objects obj
LEFT JOIN user_dependencies dep
ON dep.type = obj.object_type
AND dep.name = obj.object_name
WHERE obj.object_type in ('TYPE', 'TYPE BODY')
GROUP BY obj.object_TYPE, obj.object_NAME
ORDER BY cnt
)
LOOP
NULL;
END LOOP;
end test;
No array is explicitly used in that code. The issue seems to be linked to this specific SQL query. It disappears when the query is simplified (e.g. SELECT table_name FROM user_tables).
The code to reproduce the problem can be find in the attached file.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working