A column is compared with a literal of another type, which forces a conversion

tx0/sql:implicit-conversionrecommendedwarningreliability/logicdepth fastbug

What it finds

WHERE code = 42 on a text column, or WHERE id = 'abc' on a number column, makes the database convert one side for every row: converting the column hides it from its index, and text that is not a number fails at run time or, in MySQL, compares as 0.

From the rule's source, implicit_conversion.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:implicit-conversion" = "warning"

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

tx0 explain tx0/sql:implicit-conversion shows the same in the terminal. Found a false positive? Report it.