Rule plsql:S5141 must not raise error for join with "using" predicate

  • Version used SonarQube:7.9.1
  • Code to reporduce:
   cursor c_test is
         SELECT pr.pool_run_seq 
         FROM pool_runs_v pr
         JOIN pool_elements pe USING (pool_run_seq)
         WHERE pr.status_code = 'ACT';

The rule plsql:S5141 (SQL “JOIN” conditions should involve all joined tables) hits on pool_element table with above code and should not hit. And especially when the plsql:NaturalJoinUsageCheck indicates to use USING predicate.

Thanks to have a look.

Indeed, that’s a false positive.
I created SONARPLSQL-734 to track it.
Thanks a lot for the feedback!

Thank you.

Any news about this ?

I saw that the jira status has been changed from Open to “To Do”.

What does it means ?
Is it included or remove from the next fixes you will delivered?
Because several of my requests have been change from open to “to do”.
Thank you


It means that we are going to work on a new version for the analysis of PL/SQL in the following weeks. And these tickets will be taken into consideration.
So you should have some news soon :slight_smile:

Ok thank you for the good news.

In case of it remain some place in the next release, I made this other suggestion : Detection of unused parameter in cursor

We had several bug in production due to this mistake done by developers.