Added support for --skip-secure-file-priv

This works the same as secure-file-priv="", but is more obvious way to
turn of secure-file-priv.
This commit is contained in:
Monty 2023-08-18 13:14:14 +03:00
parent 725bd56834
commit 69c420be3d
3 changed files with 9 additions and 1 deletions

View file

@ -8261,6 +8261,13 @@ mysqld_get_one_option(const struct my_option *opt, const char *argument,
case OPT_SERVER_ID:
::server_id= global_system_variables.server_id;
break;
case OPT_SEQURE_FILE_PRIV:
if (argument == disabled_my_option)
{
my_free(opt_secure_file_priv);
opt_secure_file_priv= 0;
}
break;
case OPT_LOWER_CASE_TABLE_NAMES:
lower_case_table_names_used= 1;
break;

View file

@ -842,6 +842,7 @@ enum options_mysqld
OPT_MYSQL_COMPATIBILITY,
OPT_TLS_VERSION,
OPT_MYSQL_TO_BE_IMPLEMENTED,
OPT_SEQURE_FILE_PRIV,
OPT_which_is_always_the_last
};
#endif

View file

@ -3389,7 +3389,7 @@ static Sys_var_charptr_fscs Sys_secure_file_priv(
"Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to files "
"within specified directory",
PREALLOCATED READ_ONLY GLOBAL_VAR(opt_secure_file_priv),
CMD_LINE(REQUIRED_ARG), DEFAULT(0));
CMD_LINE(REQUIRED_ARG, OPT_SEQURE_FILE_PRIV), DEFAULT(0));
static bool check_server_id(sys_var *self, THD *thd, set_var *var)
{