mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Backport BUG#25192 Using relay-log and relay-log-index without values produces unexpected results.
Options loaded from config files were added before command line arguments, and they were parsed together, which could interprete the following: option-a option-b as --option-a=--option-b if 'option-a' requires a value, and caused confusing. Because all options that requires a value are always given in the form '--option=value', so it's an error if there is no '=value' part for such an option read from config file. This patch added a separator to separate the arguments from config files and that from command line, so that they can be handled differently. And report an error for options loaded from config files that requires a value and is not given in the form '--option=value'.
This commit is contained in:
@ -1053,6 +1053,8 @@ void mysql_read_default_options(struct st_mysql_options *options,
|
||||
char **option=argv;
|
||||
while (*++option)
|
||||
{
|
||||
if (option[0] == args_separator) /* skip arguments separator */
|
||||
continue;
|
||||
/* DBUG_PRINT("info",("option: %s",option[0])); */
|
||||
if (option[0][0] == '-' && option[0][1] == '-')
|
||||
{
|
||||
|
Reference in New Issue
Block a user