diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-10-20 13:29:27 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-10-20 13:29:27 +0200 |
commit | 55fc3fb08830cfe8e55b45f5f0e1acf55d00cb4b (patch) | |
tree | 40b09eb0e0c9ee68cbdb5c55169de4d5185666a7 | |
parent | d851dd619f9e373c453355fd613088488e2c3d5c (diff) | |
download | mariadb-git-55fc3fb08830cfe8e55b45f5f0e1acf55d00cb4b.tar.gz |
Revert "MDEV-14429 sql_safe_updates in my.cnf not work"
This reverts commit dc3a20b191362227a6f85fadfc3a8b6c76f69ec6.
It requires GET_BIT in include/my_getopt.h, which is available
only in 10.3+
-rw-r--r-- | mysql-test/r/mysqld--help.result | 2 | ||||
-rw-r--r-- | sql/sys_vars.cc | 2 | ||||
-rw-r--r-- | sql/sys_vars.h | 1 |
3 files changed, 2 insertions, 3 deletions
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index 0d8728a6768..825c7e786a3 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -790,7 +790,6 @@ The following specify which files/extra groups are read (specified before remain this size --sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual for the complete list of valid sql modes - --sql-safe-updates sql_safe_updates --stack-trace Print a symbolic stack trace on failure (Defaults to on; use --skip-stack-trace to disable.) --stored-program-cache=# @@ -1082,7 +1081,6 @@ slow-launch-time 2 slow-query-log FALSE sort-buffer-size 2097152 sql-mode -sql-safe-updates FALSE stack-trace TRUE stored-program-cache 256 symbolic-links FALSE diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 080e74ce367..ffe861ddfbc 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2719,7 +2719,7 @@ static Sys_var_bit Sys_auto_is_null( static Sys_var_bit Sys_safe_updates( "sql_safe_updates", "sql_safe_updates", - SESSION_VAR(option_bits), CMD_LINE(REQUIRED_ARG), OPTION_SAFE_UPDATES, + SESSION_VAR(option_bits), NO_CMD_LINE, OPTION_SAFE_UPDATES, DEFAULT(FALSE)); static Sys_var_bit Sys_buffer_results( diff --git a/sql/sys_vars.h b/sql/sys_vars.h index c21bf8244f0..dbe27ab107e 100644 --- a/sql/sys_vars.h +++ b/sql/sys_vars.h @@ -1443,6 +1443,7 @@ public: bitmask= reverse_semantics ? ~bitmask_arg : bitmask_arg; set(global_var_ptr(), def_val); SYSVAR_ASSERT(def_val < 2); + SYSVAR_ASSERT(getopt.id == -1); // force NO_CMD_LINE SYSVAR_ASSERT(size == sizeof(ulonglong)); } bool session_update(THD *thd, set_var *var) |