Bug #66536 Setting sql_safe_updates in my.cnf
Submitted: 25 Aug 2012 12:36 Modified: 25 Aug 2012 15:07
Reporter: Haluk Akin Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Options Severity:S4 (Feature request)
Version:5.5.25a, 5.5.28 OS:Any
Assigned to: CPU Architecture:Any

[25 Aug 2012 12:36] Haluk Akin
Description:
Currently the sql_safe_updates variable cannot be set in my.cnf.

If you set it anyhow, mysql throws the following error on restart:
"unknown variable 'sql_safe_updates=1'"

I find sql_safe_updates a very useful safety net.

One would need to add "safe-updates" command to my.cnf to turn it on.
This command sets the following variables as well:
sql_select_limit=1000
sql_max_join_size=1000000

I think sql_safe_updates is a unique variable by itself and has a great potential helping many developers. So in IMHO, we should be able to set it by itself in my.cnf without having to set two other variables.

How to repeat:
You cannot set sql_safe_updates in my.cnf
[25 Aug 2012 15:07] Valeriy Kravchuk
Verified with 5.5.28 also:

...
120825 18:04:31 [ERROR] /Users/openxs/dbs/5.5/bin/mysqld: unknown variable 'sql-safe-updates=1'

It would be nice to be able to set this variable in my.cnf or as command line option.