Commit 38df192e authored by unknown's avatar unknown

Portablity fix


mysql-test/r/have_met_timezone.require:
  Portability fix (For AIX 4.3 and other machines that doesn't support MET timezone)
mysql-test/r/timezone.result:
  Portability fix (For AIX 4.3 and other machines that doesn't support MET timezone)
mysql-test/t/mysqldump.test:
  Portablity fix (Some machines like OSF doesn't read a big double as 'inf'
mysql-test/t/timezone.test:
  Portability fix (For AIX 4.3 and other machines that doesn't support MET timezone)
parent c324fddc
Variable_name Value
timezone MET
FROM_UNIXTIME(24*3600)
1970-01-02 01:00:00
......@@ -32,6 +32,6 @@ CREATE TABLE t1 (
a double default NULL
) TYPE=MyISAM;
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (RES);
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
show variables like "timezone";
Variable_name Value
timezone MET
select @a:=FROM_UNIXTIME(1);
@a:=FROM_UNIXTIME(1)
1970-01-01 01:00:01
select unix_timestamp(@a);
unix_timestamp(@a)
1
CREATE TABLE t1 (ts int);
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 02:00'));
......@@ -23,9 +32,3 @@ ts from_unixtime(ts)
1048989599 2003-03-30 03:59:59
1048989601 2003-03-30 04:00:01
DROP TABLE t1;
select @a:=FROM_UNIXTIME(1);
@a:=FROM_UNIXTIME(1)
1970-01-01 01:00:01
select unix_timestamp(@a);
unix_timestamp(@a)
1
......@@ -25,5 +25,8 @@ DROP TABLE t1;
CREATE TABLE t1 (a double);
INSERT INTO t1 VALUES (-9e999999);
# The following replaces is here because some systems replaces the above
# double with '-inf' and others with MAX_DOUBLE
--replace_result (-1.79769313486232e+308) (RES) (NULL) (RES)
--exec $MYSQL_DUMP --skip-comments test t1
DROP TABLE t1;
......@@ -3,7 +3,7 @@
-- require r/have_met_timezone.require
disable_query_log;
show variables like "timezone";
select FROM_UNIXTIME(24*3600);
enable_query_log;
# Initialization
......@@ -11,6 +11,17 @@ enable_query_log;
DROP TABLE IF EXISTS t1;
--enable_warnings
show variables like "timezone";
#
# Test unix timestamp
#
select @a:=FROM_UNIXTIME(1);
select unix_timestamp(@a);
#
# Test of some values, including some with daylight saving time
#
CREATE TABLE t1 (ts int);
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
......@@ -27,8 +38,3 @@ INSERT INTO t1 (ts) VALUES (Unix_timestamp('2003-03-30 04:00:01'));
SELECT ts,from_unixtime(ts) FROM t1;
DROP TABLE t1;
#
# Test unix timestamp
#
select @a:=FROM_UNIXTIME(1);
select unix_timestamp(@a);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment