A test such as ROWNUM > 1 or ROWNUM = 2 can never be true

tx0/sql:rownum-never-matchesdefaulterrorreliability/control-flowdepth fastbug

What it finds

WHERE ROWNUM > 1 or ROWNUM = 2 matches no row: Oracle gives the first candidate row the number 1, it fails the test, so the next candidate is number 1 again, and so on.

From the rule's source, rownum_never_matches.rs.

Turn it on, off or suppress it

The rule runs in every tier. To turn it off for a project, set its level in tx0.toml:

tx0.toml
[rules]
"tx0/sql:rownum-never-matches" = "off"

To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.

tx0 explain tx0/sql:rownum-never-matches shows the same in the terminal. Found a false positive? Report it.