mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-4.1-runtime
into outpost.site:/home/cps/mysql/trees/4.1-runtime-bug9191 mysql-test/r/func_time.result: Auto merged mysql-test/t/func_time.test: Auto merged sql/item_timefunc.cc: Auto merged sql/mysql_priv.h: Auto merged
This commit is contained in:
@ -483,12 +483,48 @@ unix_timestamp('1969-12-01 19:00:01')
|
||||
select from_unixtime(-1);
|
||||
from_unixtime(-1)
|
||||
NULL
|
||||
select from_unixtime(2145916800);
|
||||
from_unixtime(2145916800)
|
||||
select from_unixtime(2147483647);
|
||||
from_unixtime(2147483647)
|
||||
2038-01-19 06:14:07
|
||||
select from_unixtime(2147483648);
|
||||
from_unixtime(2147483648)
|
||||
NULL
|
||||
select from_unixtime(0);
|
||||
from_unixtime(0)
|
||||
1970-01-01 03:00:00
|
||||
select unix_timestamp(from_unixtime(2147483647));
|
||||
unix_timestamp(from_unixtime(2147483647))
|
||||
2147483647
|
||||
select unix_timestamp(from_unixtime(2147483648));
|
||||
unix_timestamp(from_unixtime(2147483648))
|
||||
NULL
|
||||
select unix_timestamp('2039-01-20 01:00:00');
|
||||
unix_timestamp('2039-01-20 01:00:00')
|
||||
0
|
||||
select unix_timestamp('1968-01-20 01:00:00');
|
||||
unix_timestamp('1968-01-20 01:00:00')
|
||||
0
|
||||
select unix_timestamp('2038-02-10 01:00:00');
|
||||
unix_timestamp('2038-02-10 01:00:00')
|
||||
0
|
||||
select unix_timestamp('1969-11-20 01:00:00');
|
||||
unix_timestamp('1969-11-20 01:00:00')
|
||||
0
|
||||
select unix_timestamp('2038-01-20 01:00:00');
|
||||
unix_timestamp('2038-01-20 01:00:00')
|
||||
0
|
||||
select unix_timestamp('1969-12-30 01:00:00');
|
||||
unix_timestamp('1969-12-30 01:00:00')
|
||||
0
|
||||
select unix_timestamp('2038-01-17 12:00:00');
|
||||
unix_timestamp('2038-01-17 12:00:00')
|
||||
2147331600
|
||||
select unix_timestamp('1970-01-01 03:00:01');
|
||||
unix_timestamp('1970-01-01 03:00:01')
|
||||
1
|
||||
select unix_timestamp('2038-01-19 07:14:07');
|
||||
unix_timestamp('2038-01-19 07:14:07')
|
||||
0
|
||||
CREATE TABLE t1 (datetime datetime, timestamp timestamp, date date, time time);
|
||||
INSERT INTO t1 values ("2001-01-02 03:04:05", "2002-01-02 03:04:05", "2003-01-02", "06:07:08");
|
||||
SELECT * from t1;
|
||||
|
@ -41,7 +41,7 @@ Warning 1299 Invalid TIMESTAMP value in column 'ts' at row 2
|
||||
DROP TABLE t1;
|
||||
select unix_timestamp('1970-01-01 01:00:00'),
|
||||
unix_timestamp('1970-01-01 01:00:01'),
|
||||
unix_timestamp('2038-01-01 00:59:59'),
|
||||
unix_timestamp('2038-01-01 01:00:00');
|
||||
unix_timestamp('1970-01-01 01:00:00') unix_timestamp('1970-01-01 01:00:01') unix_timestamp('2038-01-01 00:59:59') unix_timestamp('2038-01-01 01:00:00')
|
||||
0 1 2145916799 0
|
||||
unix_timestamp('2038-01-19 04:14:07'),
|
||||
unix_timestamp('2038-01-19 04:14:08');
|
||||
unix_timestamp('1970-01-01 01:00:00') unix_timestamp('1970-01-01 01:00:01') unix_timestamp('2038-01-19 04:14:07') unix_timestamp('2038-01-19 04:14:08')
|
||||
0 1 2147483647 0
|
||||
|
@ -106,7 +106,7 @@ create table t1 (ts timestamp);
|
||||
set time_zone='UTC';
|
||||
insert into t1 values ('0000-00-00 00:00:00'),('1969-12-31 23:59:59'),
|
||||
('1970-01-01 00:00:00'),('1970-01-01 00:00:01'),
|
||||
('2037-12-31 23:59:59'),('2038-01-01 00:00:00');
|
||||
('2038-01-19 03:14:07'),('2038-01-19 03:14:08');
|
||||
Warnings:
|
||||
Warning 1264 Data truncated; out of range for column 'ts' at row 2
|
||||
Warning 1264 Data truncated; out of range for column 'ts' at row 3
|
||||
@ -117,13 +117,13 @@ ts
|
||||
0000-00-00 00:00:00
|
||||
0000-00-00 00:00:00
|
||||
1970-01-01 00:00:01
|
||||
2037-12-31 23:59:59
|
||||
2038-01-19 03:14:07
|
||||
0000-00-00 00:00:00
|
||||
delete from t1;
|
||||
set time_zone='MET';
|
||||
insert into t1 values ('0000-00-00 00:00:00'),('1970-01-01 00:30:00'),
|
||||
('1970-01-01 01:00:00'),('1970-01-01 01:00:01'),
|
||||
('2038-01-01 00:59:59'),('2038-01-01 01:00:00');
|
||||
('2038-01-19 04:14:07'),('2038-01-19 04:14:08');
|
||||
Warnings:
|
||||
Warning 1264 Data truncated; out of range for column 'ts' at row 2
|
||||
Warning 1264 Data truncated; out of range for column 'ts' at row 3
|
||||
@ -134,13 +134,13 @@ ts
|
||||
0000-00-00 00:00:00
|
||||
0000-00-00 00:00:00
|
||||
1970-01-01 01:00:01
|
||||
2038-01-01 00:59:59
|
||||
2038-01-19 04:14:07
|
||||
0000-00-00 00:00:00
|
||||
delete from t1;
|
||||
set time_zone='+01:30';
|
||||
insert into t1 values ('0000-00-00 00:00:00'),('1970-01-01 01:00:00'),
|
||||
('1970-01-01 01:30:00'),('1970-01-01 01:30:01'),
|
||||
('2038-01-01 01:29:59'),('2038-01-01 01:30:00');
|
||||
('2038-01-19 04:44:07'),('2038-01-19 04:44:08');
|
||||
Warnings:
|
||||
Warning 1264 Data truncated; out of range for column 'ts' at row 2
|
||||
Warning 1264 Data truncated; out of range for column 'ts' at row 3
|
||||
@ -151,7 +151,7 @@ ts
|
||||
0000-00-00 00:00:00
|
||||
0000-00-00 00:00:00
|
||||
1970-01-01 01:30:01
|
||||
2038-01-01 01:29:59
|
||||
2038-01-19 04:44:07
|
||||
0000-00-00 00:00:00
|
||||
drop table t1;
|
||||
show variables like 'time_zone';
|
||||
@ -213,12 +213,12 @@ convert_tz('2003-10-26 02:59:59', 'MET', 'UTC')
|
||||
select convert_tz('2003-10-26 04:00:00', 'MET', 'UTC');
|
||||
convert_tz('2003-10-26 04:00:00', 'MET', 'UTC')
|
||||
2003-10-26 03:00:00
|
||||
select convert_tz('2038-01-01 00:59:59', 'MET', 'UTC');
|
||||
convert_tz('2038-01-01 00:59:59', 'MET', 'UTC')
|
||||
2037-12-31 23:59:59
|
||||
select convert_tz('2038-01-01 01:00:00', 'MET', 'UTC');
|
||||
convert_tz('2038-01-01 01:00:00', 'MET', 'UTC')
|
||||
2038-01-01 01:00:00
|
||||
select convert_tz('2038-01-19 04:14:07', 'MET', 'UTC');
|
||||
convert_tz('2038-01-19 04:14:07', 'MET', 'UTC')
|
||||
2038-01-19 03:14:07
|
||||
select convert_tz('2038-01-19 04:14:08', 'MET', 'UTC');
|
||||
convert_tz('2038-01-19 04:14:08', 'MET', 'UTC')
|
||||
2038-01-19 04:14:08
|
||||
select convert_tz('2103-01-01 04:00:00', 'MET', 'UTC');
|
||||
convert_tz('2103-01-01 04:00:00', 'MET', 'UTC')
|
||||
2103-01-01 04:00:00
|
||||
|
6
mysql-test/r/timezone4.result
Normal file
6
mysql-test/r/timezone4.result
Normal file
@ -0,0 +1,6 @@
|
||||
select from_unixtime(0);
|
||||
from_unixtime(0)
|
||||
1969-12-31 14:00:00
|
||||
select unix_timestamp('1969-12-31 14:00:01');
|
||||
unix_timestamp('1969-12-31 14:00:01')
|
||||
1
|
Reference in New Issue
Block a user