2010年9月1日 星期三

MySQL Workench 5.2.27 CE 使用問題

使用新版Workbench時
在使用Update or Delete statement 時會出現
Error Code: 1175
You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
儘管SQL內已經包含WHERE條件式。

safe update mode是避免錯誤更改到資料表內容,強制SQL內需要包含條件式,MySQL預設是關閉的。

解決辦法:
menu->edit->preference->SQL edit->取消
Forbid UPDATE and DELETE statements without a WHERE clause (safe updates) 的選項。
就可以正常執行了。

應該是新版本的Bug吧? 相信很快就會修正了。

新版本的Workbench也有依些修改,例如要執行全部SQL script時不在只要按ctrl+enter而是改為ctrl+shift+enter,執行單行仍然是ctrl+enter。