Commit 2cd1edfc authored by Daniel Lewart's avatar Daniel Lewart Committed by Daniel Black

MDEV-25577 mariadb-tzinfo-to-sql generates superfluous warnings

The zoneinfo directory is littered with non-timezone information files.

These frequently contain extensions, not present in real timezone files.

Alo leapseconds is frequently there and is not a timezone file.
parent 9c207c88
......@@ -2470,15 +2470,6 @@ MEM_ROOT tz_storage;
char fullname[FN_REFLEN + 1];
char *root_name_end;
/*
known file types that exist in the zoneinfo directory that are safe to
silently skip
*/
const char *known_extensions[]= {
".tab",
NullS
};
/*
Recursively scan zoneinfo directory and print all found time zone
......@@ -2575,20 +2566,19 @@ scan_tz_dir(char * name_end, uint symlink_recursion_level, uint verbose)
else
{
/*
Some systems (like debian, opensuse etc) have description
files (.tab). We skip these silently if verbose is > 0
Some systems (like Debian, openSUSE, etc) have non-timezone files:
* iso3166.tab
* leap-seconds.list
* leapseconds
* tzdata.zi
* zone.tab
* zone1970.tab
We skip these silently unless verbose > 0.
*/
const char *current_ext= fn_ext(fullname);
my_bool known_ext= 0;
my_bool known_ext= strlen(current_ext) ||
!strcmp(my_basename(fullname), "leapseconds");
for (const char **ext= known_extensions ; *ext ; ext++)
{
if (!strcmp(*ext, current_ext))
{
known_ext= 1;
break;
}
}
if (verbose > 0 || !known_ext)
{
fflush(stdout);
......
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