mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
A fix (bug #5056: defaults-extra-file throws no error when file is inaccessible).
This commit is contained in:
parent
50579df606
commit
6a7306823b
1 changed files with 9 additions and 4 deletions
|
@ -152,10 +152,15 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv,
|
|||
}
|
||||
else if (defaults_extra_file)
|
||||
{
|
||||
if (search_default_file(func, func_ctx, NullS,
|
||||
defaults_extra_file) < 0)
|
||||
if (search_default_file_with_ext(func, func_ctx, "", "",
|
||||
defaults_extra_file, 0) < 0)
|
||||
goto err; /* Fatal error */
|
||||
|
||||
if (error > 0)
|
||||
{
|
||||
fprintf(stderr, "Could not open required defaults file: %s\n",
|
||||
defaults_extra_file);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -526,7 +531,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler,
|
|||
}
|
||||
#endif
|
||||
if (!(fp= my_fopen(name, O_RDONLY, MYF(0))))
|
||||
return 0; /* Ignore wrong files */
|
||||
return 1; /* Ignore wrong files */
|
||||
|
||||
while (fgets(buff, sizeof(buff) - 1, fp))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue