An arithmetic or concatenation operand is the literal NULL, so the result is always NULL

tx0/sql:arithmetic-with-nulldefaulterrorreliability/null-safetydepth fastbug

What it finds

price * NULL or 'a' || NULL is always NULL: arithmetic and concatenation with NULL give NULL. The expression was probably meant to use COALESCE or another value.

Oracle, where || treats NULL as an empty string, and MySQL, where || means OR by default, are left alone for ||.

From the rule's source, arithmetic_with_null.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:arithmetic-with-null" = "off"

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

tx0 explain tx0/sql:arithmetic-with-null shows the same in the terminal. Found a false positive? Report it.