A LIKE pattern of only % matches every value that is not NULL

tx0/sql:like-matches-everythingrecommendedwarningreliability/logicdepth fastbug

What it finds

x LIKE '%' matches every value except NULL, so it filters nothing but NULLs, which IS NOT NULL says; NOT LIKE '%' matches nothing.

From the rule's source, like_matches_everything.rs.

Turn it on, off or suppress it

The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/sql:like-matches-everything" = "warning"

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

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