MySQL error 1175 has its own Stack Overflow question with more than three million views, and most of its answers explain how to switch safe-updates mode off. That's a shame, because the mode does catch the classic accident. It just doesn't catch all of it. And it blocks a fair amount of correct SQL, which is why people switch it off in the first place.
So we ran 22 write statements ( UPDATE , DELETE , a CALL and a TRUNCATE ) against MySQL 8.4 and MariaDB 11.4 with sql_safe_updates = 1 , each one against a fresh 1000-row table, and counted what actually changed.
The test
One table: orders (id PRIMARY KEY, customer_id INDEXED, status, total) , 1000 rows, 100 of them status = 'new' and 20 per customer. A small customers table for the join case. Default server settings, InnoDB, the official Docker images (MySQL 8.4.13 and MariaDB 11.4.13).…