MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:June 14 2006 1:54pm
Subject:bk commit into 5.1 tree (msvensson:1.2191) BUG#19408
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2191 06/06/14 15:54:04 msvensson@neptunus.(none) +2 -0
  Bug#19408 Test 'func_time' fails on Windows x64
   - The setting of "ENV{'TZ'}" doesn't affect the timezone
     used by MySQL Server on Windows.
   - Explicitly set timezone to "+03:00" in test case before
     doing the calculatiosn to check that there is three hours
     difference between utc and local time.

  mysql-test/t/func_time.test
    1.44 06/06/14 15:53:55 msvensson@neptunus.(none) +7 -0
    Set timezone to GMT-3, to make it possible to use "interval 3 hour"

  mysql-test/r/func_time.result
    1.54 06/06/14 15:53:55 msvensson@neptunus.(none) +2 -0
    Update test results

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/my51-bug19408

--- 1.53/mysql-test/r/func_time.result	2006-06-04 17:56:56 +02:00
+++ 1.54/mysql-test/r/func_time.result	2006-06-14 15:53:55 +02:00
@@ -700,6 +700,7 @@ last_day("1997-12-1")+0
 select last_day("1997-12-1")+0.0;
 last_day("1997-12-1")+0.0
 19971231.0
+set time_zone="+03:00";
 select strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0;
 strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0
 1
@@ -718,6 +719,7 @@ strcmp(date_format(utc_timestamp(),"%Y-%
 select strcmp(concat(utc_date(),' ',utc_time()),utc_timestamp())=0;
 strcmp(concat(utc_date(),' ',utc_time()),utc_timestamp())=0
 1
+set time_zone= @@global.time_zone;
 explain extended select period_add("9602",-12),period_diff(199505,"9404"),from_days(to_days("960101")),dayofmonth("1997-01-02"), month("1997-01-02"), monthname("1972-03-04"),dayofyear("0000-00-00"),HOUR("1997-03-03 23:03:22"),MINUTE("23:03:22"),SECOND(230322),QUARTER(980303),WEEK("1998-03-03"),yearweek("2000-01-01",1),week(19950101,1),year("98-02-03"),weekday(curdate())-weekday(now()),dayname("1962-03-03"),unix_timestamp(),sec_to_time(time_to_sec("0:30:47")/6.21),curtime(),utc_time(),curdate(),utc_date(),utc_timestamp(),date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w"),from_unixtime(unix_timestamp("1994-03-02 10:11:12")),"1997-12-31 23:59:59" + INTERVAL 1 SECOND,"1998-01-01 00:00:00" - INTERVAL 1 SECOND,INTERVAL 1 DAY + "1997-12-31", extract(YEAR FROM "1999-01-02 10:11:12"),date_add("1997-12-31 23:59:59",INTERVAL 1 SECOND);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used

--- 1.43/mysql-test/t/func_time.test	2006-06-04 18:23:38 +02:00
+++ 1.44/mysql-test/t/func_time.test	2006-06-14 15:53:55 +02:00
@@ -335,12 +335,19 @@ select last_day("1997-12-1")+0.0;
 
 # Test SAPDB UTC_% functions. This part is TZ dependant (It is supposed that
 # TZ variable set to GMT-3
+
+# Set timezone to GMT-3, to make it possible to use "interval 3 hour"
+set time_zone="+03:00";
+
 select strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0;
 select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%T"), utc_time())=0;
 select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%Y-%m-%d"), utc_date())=0;
 select strcmp(date_format(utc_timestamp(),"%T"), utc_time())=0;
 select strcmp(date_format(utc_timestamp(),"%Y-%m-%d"), utc_date())=0;
 select strcmp(concat(utc_date(),' ',utc_time()),utc_timestamp())=0;
+
+# Restore timezone to default
+set time_zone= @@global.time_zone;
 
 explain extended select period_add("9602",-12),period_diff(199505,"9404"),from_days(to_days("960101")),dayofmonth("1997-01-02"), month("1997-01-02"), monthname("1972-03-04"),dayofyear("0000-00-00"),HOUR("1997-03-03 23:03:22"),MINUTE("23:03:22"),SECOND(230322),QUARTER(980303),WEEK("1998-03-03"),yearweek("2000-01-01",1),week(19950101,1),year("98-02-03"),weekday(curdate())-weekday(now()),dayname("1962-03-03"),unix_timestamp(),sec_to_time(time_to_sec("0:30:47")/6.21),curtime(),utc_time(),curdate(),utc_date(),utc_timestamp(),date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w"),from_unixtime(unix_timestamp("1994-03-02 10:11:12")),"1997-12-31 23:59:59" + INTERVAL 1 SECOND,"1998-01-01 00:00:00" - INTERVAL 1 SECOND,INTERVAL 1 DAY + "1997-12-31", extract(YEAR FROM "1999-01-02 10:11:12"),date_add("1997-12-31 23:59:59",INTERVAL 1 SECOND);
 
Thread
bk commit into 5.1 tree (msvensson:1.2191) BUG#19408msvensson14 Jun