1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

cleanup: tests

* combine two test files with seemingly the same name
* comments
This commit is contained in:
Sergei Golubchik
2021-12-20 18:57:52 +01:00
parent c1cef1afa9
commit 349a595bc4
8 changed files with 189 additions and 255 deletions

View File

@ -7,24 +7,19 @@ disable_query_log;
select FROM_UNIXTIME(24*3600);
enable_query_log;
# Initialization
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
# The following is because of daylight saving time
--replace_result MEST MET
show variables like "system_time_zone";
#
# Test unix timestamp
#
--echo #
--echo # Test unix timestamp
--echo #
select @a:=FROM_UNIXTIME(1);
select unix_timestamp(@a);
#
# Test of some values, including some with daylight saving time
#
--echo #
--echo # Test of some values, including some with daylight saving time
--echo #
CREATE TABLE t1 (ts int);
INSERT INTO t1 (ts) VALUES (Unix_timestamp('2002-10-27 01:00'));
@ -42,19 +37,18 @@ SELECT ts,from_unixtime(ts) FROM t1;
DROP TABLE t1;
#
# Test of warning for spring time-gap values for system time zone
#
--echo #
--echo # Test of warning for spring time-gap values for system time zone
--echo #
CREATE TABLE t1 (ts timestamp);
INSERT INTO t1 (ts) VALUES ('2003-03-30 01:59:59'),
('2003-03-30 02:59:59'),
('2003-03-30 03:00:00');
DROP TABLE t1;
#
# Test for fix for Bug#2523 Check that boundary dates are processed
# correctly.
#
--echo #
--echo # Test for fix for Bug#2523 Check that boundary dates are processed correctly.
--echo #
select unix_timestamp('1970-01-01 01:00:00'),
unix_timestamp('1970-01-01 01:00:01'),
unix_timestamp('2038-01-19 04:14:07'),
@ -62,4 +56,6 @@ select unix_timestamp('1970-01-01 01:00:00'),
select unix_timestamp('1969-12-31 23:59:59'), unix_timestamp('1970-01-01 00:00:00'), unix_timestamp('1970-01-01 00:59:59');
# End of 4.1 tests
--echo #
--echo # End of 4.1 tests
--echo #