Loading mysql-test/r/timezone2.result +7 −0 Original line number Diff line number Diff line Loading @@ -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; mysql-test/t/timezone2.test +12 −0 Original line number Diff line number Diff line Loading @@ -187,3 +187,15 @@ select convert_tz('2003-12-31 04:00:00', 'SomeNotExistingTimeZone', 'UTC'); select convert_tz('2003-12-31 04:00:00', 'MET', 'SomeNotExistingTimeZone'); select convert_tz('2003-12-31 04:00:00', 'MET', NULL); select convert_tz( NULL, 'MET', 'UTC'); # # Test for bug #4508 "CONVERT_TZ() function with new time zone as param # crashes server." (Was caused by improperly worked mechanism of time zone # dynamical loading). # create table t1 (ts timestamp); set timestamp=1000000000; insert into t1 (ts) values (now()); select convert_tz(ts, @@time_zone, 'Japan') from t1; drop table t1; scripts/mysql_create_system_tables.sh +7 −4 Original line number Diff line number Diff line Loading @@ -307,7 +307,8 @@ then then i_tzn="$i_tzn INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES" i_tzn="$i_tzn ('MET', 1), ('UTC', 2), ('Universal', 2), " i_tzn="$i_tzn ('Europe/Moscow',3), ('leap/Europe/Moscow',4);" i_tzn="$i_tzn ('Europe/Moscow',3), ('leap/Europe/Moscow',4), " i_tzn="$i_tzn ('Japan', 5);" fi fi Loading @@ -327,7 +328,7 @@ then if test "$1" = "test" then i_tz="$i_tz INSERT INTO time_zone (Time_zone_id, Use_leap_seconds)" i_tz="$i_tz VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y');" i_tz="$i_tz VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y'), (5,'N');" fi fi Loading Loading @@ -546,7 +547,8 @@ then i_tzt="$i_tzt ,(4, 2045689222, 8) ,(4, 2058390022, 9)" i_tzt="$i_tzt ,(4, 2077138822, 8) ,(4, 2090444422, 9)" i_tzt="$i_tzt ,(4, 2108588422, 8) ,(4, 2121894022, 9)" i_tzt="$i_tzt ,(4, 2140038022, 8);" i_tzt="$i_tzt ,(4, 2140038022, 8)" i_tzt="$i_tzt ,(5, -1009875600, 1);" fi fi Loading Loading @@ -584,7 +586,8 @@ then i_tztt="$i_tztt ,(4, 4, 10800, 0, 'MSK') ,(4, 5, 14400, 1, 'MSD')" i_tztt="$i_tztt ,(4, 6, 18000, 1, 'MSD') ,(4, 7, 7200, 0, 'EET')" i_tztt="$i_tztt ,(4, 8, 10800, 0, 'MSK') ,(4, 9, 14400, 1, 'MSD')" i_tztt="$i_tztt ,(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET');" i_tztt="$i_tztt ,(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET')" i_tztt="$i_tztt ,(5, 0, 32400, 0, 'CJT') ,(5, 1, 32400, 0, 'JST');" fi fi Loading sql/item_create.cc +0 −5 Original line number Diff line number Diff line Loading @@ -89,11 +89,6 @@ Item *create_func_conv(Item* a, Item *b, Item *c) return new Item_func_conv(a,b,c); } Item *create_func_convert_tz(Item* a, Item *b, Item *c) { return new Item_func_convert_tz(a,b,c); } Item *create_func_cos(Item* a) { return new Item_func_cos(a); Loading sql/item_create.h +0 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ Item *create_func_char_length(Item* a); Item *create_func_cast(Item *a, Cast_target cast_type, int len, CHARSET_INFO *cs); Item *create_func_connection_id(void); Item *create_func_conv(Item* a, Item *b, Item *c); Item *create_func_convert_tz(Item* a, Item *b, Item *c); Item *create_func_cos(Item* a); Item *create_func_cot(Item* a); Item *create_func_crc32(Item* a); Loading Loading
mysql-test/r/timezone2.result +7 −0 Original line number Diff line number Diff line Loading @@ -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;
mysql-test/t/timezone2.test +12 −0 Original line number Diff line number Diff line Loading @@ -187,3 +187,15 @@ select convert_tz('2003-12-31 04:00:00', 'SomeNotExistingTimeZone', 'UTC'); select convert_tz('2003-12-31 04:00:00', 'MET', 'SomeNotExistingTimeZone'); select convert_tz('2003-12-31 04:00:00', 'MET', NULL); select convert_tz( NULL, 'MET', 'UTC'); # # Test for bug #4508 "CONVERT_TZ() function with new time zone as param # crashes server." (Was caused by improperly worked mechanism of time zone # dynamical loading). # create table t1 (ts timestamp); set timestamp=1000000000; insert into t1 (ts) values (now()); select convert_tz(ts, @@time_zone, 'Japan') from t1; drop table t1;
scripts/mysql_create_system_tables.sh +7 −4 Original line number Diff line number Diff line Loading @@ -307,7 +307,8 @@ then then i_tzn="$i_tzn INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES" i_tzn="$i_tzn ('MET', 1), ('UTC', 2), ('Universal', 2), " i_tzn="$i_tzn ('Europe/Moscow',3), ('leap/Europe/Moscow',4);" i_tzn="$i_tzn ('Europe/Moscow',3), ('leap/Europe/Moscow',4), " i_tzn="$i_tzn ('Japan', 5);" fi fi Loading @@ -327,7 +328,7 @@ then if test "$1" = "test" then i_tz="$i_tz INSERT INTO time_zone (Time_zone_id, Use_leap_seconds)" i_tz="$i_tz VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y');" i_tz="$i_tz VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y'), (5,'N');" fi fi Loading Loading @@ -546,7 +547,8 @@ then i_tzt="$i_tzt ,(4, 2045689222, 8) ,(4, 2058390022, 9)" i_tzt="$i_tzt ,(4, 2077138822, 8) ,(4, 2090444422, 9)" i_tzt="$i_tzt ,(4, 2108588422, 8) ,(4, 2121894022, 9)" i_tzt="$i_tzt ,(4, 2140038022, 8);" i_tzt="$i_tzt ,(4, 2140038022, 8)" i_tzt="$i_tzt ,(5, -1009875600, 1);" fi fi Loading Loading @@ -584,7 +586,8 @@ then i_tztt="$i_tztt ,(4, 4, 10800, 0, 'MSK') ,(4, 5, 14400, 1, 'MSD')" i_tztt="$i_tztt ,(4, 6, 18000, 1, 'MSD') ,(4, 7, 7200, 0, 'EET')" i_tztt="$i_tztt ,(4, 8, 10800, 0, 'MSK') ,(4, 9, 14400, 1, 'MSD')" i_tztt="$i_tztt ,(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET');" i_tztt="$i_tztt ,(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET')" i_tztt="$i_tztt ,(5, 0, 32400, 0, 'CJT') ,(5, 1, 32400, 0, 'JST');" fi fi Loading
sql/item_create.cc +0 −5 Original line number Diff line number Diff line Loading @@ -89,11 +89,6 @@ Item *create_func_conv(Item* a, Item *b, Item *c) return new Item_func_conv(a,b,c); } Item *create_func_convert_tz(Item* a, Item *b, Item *c) { return new Item_func_convert_tz(a,b,c); } Item *create_func_cos(Item* a) { return new Item_func_cos(a); Loading
sql/item_create.h +0 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ Item *create_func_char_length(Item* a); Item *create_func_cast(Item *a, Cast_target cast_type, int len, CHARSET_INFO *cs); Item *create_func_connection_id(void); Item *create_func_conv(Item* a, Item *b, Item *c); Item *create_func_convert_tz(Item* a, Item *b, Item *c); Item *create_func_cos(Item* a); Item *create_func_cot(Item* a); Item *create_func_crc32(Item* a); Loading