A SET clause assigns the same column twice

tx0/sql:duplicate-set-columndefaulterrorreliability/collectionsdepth fastbug

What it finds

UPDATE t SET a = 1, a = 2: the same column is assigned twice in one SET. PostgreSQL, SQL Server and SQLite reject it; MySQL applies both from left to right, so the first assignment is lost. Either way one of them names the wrong column.

From the rule's source, duplicate_set_column.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:duplicate-set-column" = "off"

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

tx0 explain tx0/sql:duplicate-set-column shows the same in the terminal. Found a false positive? Report it.