mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server".
Instead of trying to open time zone tables during calculation of CONVERT_TZ() function or setting of @@time_zone variable we should open and lock them with the rest of statement's table (so we should add them to global table list) and after that use such pre-opened tables for loading info about time zones.
This commit is contained in:
@@ -244,3 +244,10 @@ NULL
|
||||
select convert_tz( NULL, 'MET', 'UTC');
|
||||
convert_tz( NULL, 'MET', 'UTC')
|
||||
NULL
|
||||
create table t1 (ts timestamp);
|
||||
set timestamp=1000000000;
|
||||
insert into t1 (ts) values (now());
|
||||
select convert_tz(ts, @@time_zone, 'Japan') from t1;
|
||||
convert_tz(ts, @@time_zone, 'Japan')
|
||||
2001-09-09 10:46:40
|
||||
drop table t1;
|
||||
|
||||
Reference in New Issue
Block a user