diff options
author | unknown <tnurnberg@mysql.com> | 2006-06-22 20:23:22 +0200 |
---|---|---|
committer | unknown <tnurnberg@mysql.com> | 2006-06-22 20:23:22 +0200 |
commit | e8beb72cc6bc1ad72e341b2b8f20ccaba95dfb38 (patch) | |
tree | bc9d2508ef9dcadbb3eb878e33347effa2df838e | |
parent | 41af8b9e3bcf8bd7862156576c1fb46cd00f1c21 (diff) | |
download | mariadb-git-e8beb72cc6bc1ad72e341b2b8f20ccaba95dfb38.tar.gz |
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.
(Magnus' fix)
mysql-test/r/func_time.result:
Update test results
mysql-test/t/func_time.test:
Set timezone to GMT-3, to make it possible to use "interval 3 hour"
-rw-r--r-- | mysql-test/r/func_time.result | 2 | ||||
-rw-r--r-- | mysql-test/t/func_time.test | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 593ce7b26c8..aaa86378626 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1,4 +1,5 @@ drop table if exists t1,t2,t3; +set time_zone="+03:00"; select from_days(to_days("960101")),to_days(960201)-to_days("19960101"),to_days(date_add(curdate(), interval 1 day))-to_days(curdate()),weekday("1997-11-29"); from_days(to_days("960101")) to_days(960201)-to_days("19960101") to_days(date_add(curdate(), interval 1 day))-to_days(curdate()) weekday("1997-11-29") 1996-01-01 31 1 5 @@ -945,3 +946,4 @@ id day id day 1 2005-06-01 3 2005-07-15 3 2005-07-01 3 2005-07-15 DROP TABLE t1,t2; +set time_zone= @@global.time_zone; diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index d817d016881..05c033f2b22 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -5,6 +5,9 @@ drop table if exists t1,t2,t3; --enable_warnings +# Set timezone to GMT-3, to make it possible to use "interval 3 hour" +set time_zone="+03:00"; + select from_days(to_days("960101")),to_days(960201)-to_days("19960101"),to_days(date_add(curdate(), interval 1 day))-to_days(curdate()),weekday("1997-11-29"); select period_add("9602",-12),period_diff(199505,"9404") ; @@ -335,6 +338,7 @@ 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 + 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; @@ -513,3 +517,6 @@ SELECT * FROM t1, t2 DROP TABLE t1,t2; # End of 5.0 tests + +# Restore timezone to default +set time_zone= @@global.time_zone; |