Skip navigation links

User Comments

Posted by Yi Peng on August 29 2010 10:46am[Delete] [Edit]

On Windows, MySQL server 5.1 defaults to safe update mode, even though safe-updates is not enabled in my.ini (a bug possibly?). Truncating table results in error listed below.

Message: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

I found that the easiest way to disable the safe mode is to execute this SQL statement first to disable safe update mode temporarily.

SET sql_safe_updates=0

Defaulting to safe update mode is not bad after all.