Commit 8a61200b authored by ram@gw.mysql.r18.ru's avatar ram@gw.mysql.r18.ru

A fix (bug #5056: defaults-extra-file throws no error when file is inaccessible).

parent 7b8b5d89
......@@ -164,9 +164,12 @@ int load_defaults(const char *conf_file, const char **groups,
if (forced_default_file)
{
if ((error= search_default_file(&args, &alloc, "",
forced_default_file, "", &group)) < 0)
forced_default_file, "", &group)))
{
fprintf(stderr, "Error reading '%s' file.\n", forced_default_file);
goto err;
}
}
else if (dirname_length(conf_file))
{
if ((error= search_default_file(&args, &alloc, NullS, conf_file,
......@@ -199,11 +202,14 @@ int load_defaults(const char *conf_file, const char **groups,
else if (defaults_extra_file)
{
if (search_default_file(&args, &alloc, NullS, defaults_extra_file,
default_ext, &group) < 0)
default_ext, &group))
{
fprintf(stderr, "Error reading '%s' file.\n", defaults_extra_file);
goto err; /* Fatal error */
}
}
}
}
/*
Here error contains <> 0 only if we have a fully specified conf_file
or a forced default file
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment