Skip to content

Commit 082a497

Browse files
committed
PS-9293, PS-9328: Revert of fix for PS-7221: Bug #100402 (crash on select Sys_var_tz::session_value_ptr)
Reverting Percona Server's version of the fix which is no longer necessary. Upstream fixed this issue in a different, more complex, but also probably more clean way in their fix for bug#31168097 "SIG 6 ASSERTION `0' IN TIME_ZONE_UTC::GET_NAME AT TZTIME.CC:1182". See: mysql/mysql-server@1f8c02e The test case for this issue is kept around.
1 parent 646a7cf commit 082a497

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

sql/tztime.cc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,6 @@ static my_time_t TIME_to_gmt_sec(const MYSQL_TIME *t, const TIME_ZONE_INFO *sp,
557557
String with names of SYSTEM time zone.
558558
*/
559559
static const String tz_SYSTEM_name("SYSTEM", 6, &my_charset_latin1);
560-
static const String tz_UTC_name("UTC", 3, &my_charset_latin1);
561560

562561
Time_zone *my_tz_find(const int64 displacement);
563562

@@ -819,10 +818,19 @@ void Time_zone_utc::gmt_sec_to_TIME(MYSQL_TIME *tmp, my_time_t t) const {
819818
SYNOPSIS
820819
get_name()
821820
821+
DESCRIPTION
822+
Since Time_zone_utc is used only internally by SQL's UTC_* functions it
823+
is not accessible directly, and hence this function of Time_zone
824+
interface is not implemented for this class and should not be called.
825+
822826
RETURN VALUE
823-
Name of time zone as String
827+
0
824828
*/
825-
const String *Time_zone_utc::get_name() const { return &tz_UTC_name; }
829+
const String *Time_zone_utc::get_name() const {
830+
/* Should be never called */
831+
assert(0);
832+
return nullptr;
833+
}
826834

827835
/*
828836
Instance of this class represents some time zone which is

0 commit comments

Comments
 (0)