It’s possible to inadvertently issue statements that modify many rows in a table or that return extremely large result sets. The –safe-updates option helps prevent these problems. The option is particularly useful for people who are just learning to use MySQL. –safe-updates has the following effects:
- UPDATE and DELETE statements are allowed only if they include a WHERE clause that specifically identifies which records to update or delete by means of a key value, or if they include a LIMIT clause.
- Output from single-table SELECT statements is restricted to no more than 1,000 rows unless the statement includes a LIMIT clause.
- Multiple-table SELECT statements are allowed only if MySQL will examine no more than 1,000,000 rows to process the query.
Posted in: MySQL