Skip to content

Commit dc3a20b

Browse files
committed
MDEV-14429 sql_safe_updates in my.cnf not work
1 parent 9905949 commit dc3a20b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

mysql-test/r/mysqld--help.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,7 @@ The following specify which files/extra groups are read (specified before remain
790790
this size
791791
--sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual
792792
for the complete list of valid sql modes
793+
--sql-safe-updates sql_safe_updates
793794
--stack-trace Print a symbolic stack trace on failure
794795
(Defaults to on; use --skip-stack-trace to disable.)
795796
--stored-program-cache=#
@@ -1081,6 +1082,7 @@ slow-launch-time 2
10811082
slow-query-log FALSE
10821083
sort-buffer-size 2097152
10831084
sql-mode
1085+
sql-safe-updates FALSE
10841086
stack-trace TRUE
10851087
stored-program-cache 256
10861088
symbolic-links FALSE

sql/sys_vars.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2719,7 +2719,7 @@ static Sys_var_bit Sys_auto_is_null(
27192719

27202720
static Sys_var_bit Sys_safe_updates(
27212721
"sql_safe_updates", "sql_safe_updates",
2722-
SESSION_VAR(option_bits), NO_CMD_LINE, OPTION_SAFE_UPDATES,
2722+
SESSION_VAR(option_bits), CMD_LINE(REQUIRED_ARG), OPTION_SAFE_UPDATES,
27232723
DEFAULT(FALSE));
27242724

27252725
static Sys_var_bit Sys_buffer_results(

sql/sys_vars.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,6 @@ class Sys_var_bit: public Sys_var_typelib
14431443
bitmask= reverse_semantics ? ~bitmask_arg : bitmask_arg;
14441444
set(global_var_ptr(), def_val);
14451445
SYSVAR_ASSERT(def_val < 2);
1446-
SYSVAR_ASSERT(getopt.id == -1); // force NO_CMD_LINE
14471446
SYSVAR_ASSERT(size == sizeof(ulonglong));
14481447
}
14491448
bool session_update(THD *thd, set_var *var)

0 commit comments

Comments
 (0)