From a8fd4a54c7025a42899b1e60408e34dfa1ab3654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Wed, 15 May 2024 20:31:40 +0200 Subject: [PATCH] mysql_tzinfo_to_sql: suppress expected warnings --- sql/mysql_tzinfo_to_sql.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sql/mysql_tzinfo_to_sql.cc b/sql/mysql_tzinfo_to_sql.cc index f8a3331ca5f..f5ee0ac70bf 100644 --- a/sql/mysql_tzinfo_to_sql.cc +++ b/sql/mysql_tzinfo_to_sql.cc @@ -291,7 +291,7 @@ char *root_name_end; */ static bool scan_tz_dir(char *name_end) { MY_DIR *cur_dir; - char *name_end_tmp; + char *name_end_tmp, *bname; uint i; if (!(cur_dir = my_dir(fullname, MYF(MY_WANT_STAT)))) return true; @@ -309,6 +309,16 @@ static bool scan_tz_dir(char *name_end) { return true; } } else if (MY_S_ISREG(cur_dir->dir_entry[i].mystat->st_mode)) { + bname = basename(fullname); + if ((strcmp(bname,"iso3166.tab") == 0) || + (strcmp(bname,"leap-seconds.list") == 0) || + (strcmp(bname,"leapseconds") == 0) || + (strcmp(bname,"tzdata.zi") == 0) || + (strcmp(bname,"zone.tab") == 0) || + (strcmp(bname,"zone1970.tab") == 0)) { + continue; + } + ::new ((void *)&tz_storage) MEM_ROOT(PSI_NOT_INSTRUMENTED, 32768); if (!tz_load(fullname, &tz_info, &tz_storage)) print_tz_as_sql(root_name_end + 1, &tz_info); -- 2.45.0