Bug #85353 Ambiguous Error Message in safe_updates mode
Submitted: 8 Mar 2017 1:26 Modified: 9 Mar 2017 8:32
Reporter: Dan Reif Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S4 (Feature request)
Version:5.6,5.7.17 OS:Any
Assigned to: CPU Architecture:Any

[8 Mar 2017 1:26] Dan Reif
Description:
Error 1175 reads:

MySQL error code 1175 (ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE): You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

However, this is ambiguous.  The phrase "that uses a KEY column" could be modifying "table" or "WHERE", leading to two different interpretations:
* "You tried to update a table that uses a KEY column without a WHERE"
* "You tried to update a table without using a WHERE-which-uses-a-KEY-column"

Since this error can also represent the complete lack of a WHERE column, phrasing is a bit tricky, but an improved version could be:

"You are using safe update mode and you tried to update a table without using a KEY column in your WHERE"

How to repeat:
Trigger error 1175.

Suggested fix:
"You are using safe update mode and you tried to update a table without using a KEY column in your WHERE"
[9 Mar 2017 8:32] MySQL Verification Team
Hello Dan Reif,

Thank you for the report and feedback!

Thanks,
Umesh