diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-09-29 16:30:57 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-10-14 10:29:30 +0200 |
commit | f217612fade6684c6003aea9a9bfc7ab41685ace (patch) | |
tree | 65ebc4daa0720dd13034840f716437671160f54d /sql | |
parent | 927521a2c18954f03869e91281b90af79b719166 (diff) | |
download | mariadb-git-f217612fade6684c6003aea9a9bfc7ab41685ace.tar.gz |
MDEV-12684 Show what config file a sysvar got a value from
change get_one_option() prototype to pass the filename and
not to pass the redundant optid.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysql_install_db.cc | 4 | ||||
-rw-r--r-- | sql/mysql_upgrade_service.cc | 6 | ||||
-rw-r--r-- | sql/mysqld.cc | 7 | ||||
-rw-r--r-- | sql/sql_plugin.cc | 4 | ||||
-rw-r--r-- | sql/tztime.cc | 7 |
5 files changed, 13 insertions, 15 deletions
diff --git a/sql/mysql_install_db.cc b/sql/mysql_install_db.cc index 8a83f22751a..915db629f44 100644 --- a/sql/mysql_install_db.cc +++ b/sql/mysql_install_db.cc @@ -96,10 +96,10 @@ static struct my_option my_long_options[]= static my_bool -get_one_option(int optid, const struct my_option *, char *) +get_one_option(const struct my_option *opt, char *, const char *) { DBUG_ENTER("get_one_option"); - switch (optid) { + switch (opt->id) { case '?': printf("%s\n", USAGETEXT); my_print_help(my_long_options); diff --git a/sql/mysql_upgrade_service.cc b/sql/mysql_upgrade_service.cc index a9df9eaf13b..b612f31a289 100644 --- a/sql/mysql_upgrade_service.cc +++ b/sql/mysql_upgrade_service.cc @@ -78,12 +78,10 @@ static struct my_option my_long_options[]= static my_bool -get_one_option(int optid, - const struct my_option *opt __attribute__ ((unused)), - char *argument __attribute__ ((unused))) +get_one_option(const struct my_option *opt, char *, const char *) { DBUG_ENTER("get_one_option"); - switch (optid) { + switch (opt->id) { case '?': printf("%s\n", USAGETEXT); my_print_help(my_long_options); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 4fc24c3a7d5..fba19622995 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1472,7 +1472,7 @@ static int mysql_init_variables(void); static int get_options(int *argc_ptr, char ***argv_ptr); static bool add_terminator(DYNAMIC_ARRAY *options); static bool add_many_options(DYNAMIC_ARRAY *, my_option *, size_t); -extern "C" my_bool mysqld_get_one_option(int, const struct my_option *, char *); +extern "C" my_bool mysqld_get_one_option(const struct my_option *, char *, const char *); static int init_thread_environment(); static char *get_relative_path(const char *path); static int fix_paths(void); @@ -7981,7 +7981,8 @@ static int mysql_init_variables(void) } my_bool -mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) +mysqld_get_one_option(const struct my_option *opt, char *argument, + const char *) { if (opt->app_type) { @@ -7994,7 +7995,7 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument) var->value_origin= sys_var::CONFIG; } - switch(optid) { + switch(opt->id) { case '#': #ifndef DBUG_OFF if (!argument) diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 7e56e0c3a67..9807a1235f5 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -3984,8 +3984,8 @@ static my_option *construct_help_options(MEM_ROOT *mem_root, DBUG_RETURN(opts); } -extern "C" my_bool mark_changed(int, const struct my_option *, char *); -my_bool mark_changed(int, const struct my_option *opt, char *) +extern "C" my_bool mark_changed(const struct my_option *, char *, const char *); +my_bool mark_changed(const struct my_option *opt, char *, const char *) { if (opt->app_type) { diff --git a/sql/tztime.cc b/sql/tztime.cc index c45a6598d69..afbe7639dda 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -2641,8 +2641,7 @@ static struct my_option my_long_options[] = C_MODE_START -static my_bool get_one_option(int optid, const struct my_option *, - char *argument); +static my_bool get_one_option(const struct my_option *, char *, const char *); C_MODE_END static void print_version(void) @@ -2664,9 +2663,9 @@ static void print_usage(void) static my_bool -get_one_option(int optid, const struct my_option *opt, char *argument) +get_one_option(const struct my_option *opt, char *argument, const char *) { - switch(optid) { + switch(opt->id) { case '#': #ifndef DBUG_OFF DBUG_PUSH(argument ? argument : "d:t:S:i:O,/tmp/mysq_tzinfo_to_sql.trace"); |