diff options
Diffstat (limited to 'sql/tztime.cc')
-rw-r--r-- | sql/tztime.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc index 1c482718cc8..8ddb9f0e30e 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -2004,7 +2004,11 @@ tz_load_from_open_tables(const String *tz_name, TABLE_LIST *tz_tables) #endif /* ttid is increasing because we are reading using index */ - DBUG_ASSERT(ttid >= tmp_tz_info.typecnt); + if (ttid < tmp_tz_info.typecnt) + { + sql_print_error("mysql.time_zone_transition_type table is incorrectly defined or corrupted"); + goto end; + } tmp_tz_info.typecnt= ttid + 1; @@ -2517,7 +2521,7 @@ scan_tz_dir(char * name_end, uint symlink_recursion_level, uint verbose) { MY_DIR *cur_dir; char *name_end_tmp; - uint i; + size_t i; /* Sort directory data, to pass mtr tests on different platforms. */ if (!(cur_dir= my_dir(fullname, MYF(MY_WANT_STAT|MY_WANT_SORT)))) |