Navigation Menu

Skip to content

Commit

Permalink
test: use "1990-00-00 00:00:00" instead of "0000-00-00 00:00:00"
Browse files Browse the repository at this point in the history
"0000-01-01" is not supported on 32-bit systems and this test failed.
This test is aimed to check that "XXXX-00-00" is corrected to "XXXX-01-01".
"0000" is not important.
  • Loading branch information
s-yata committed Jul 1, 2015
1 parent 7765389 commit 93ce8ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -5,17 +5,17 @@ start datetime,
end datetime,
UNIQUE KEY range_key(start, end)
);
INSERT INTO ranges VALUES (1, "0000-00-00 00:00:00", "2012-10-05 23:59:59");
INSERT INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59");
Warnings:
Warning 1265 Data truncated for column 'start' at row 1
SELECT * FROM ranges;
id start end
1 0000-01-01 00:00:00 2012-10-05 23:59:59
1 1990-01-01 00:00:00 2012-10-05 23:59:59
DELETE FROM ranges WHERE id = 1;
INSERT INTO ranges VALUES (1, "0000-00-00 00:00:00", "2012-10-05 23:59:59");
INSERT INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59");
Warnings:
Warning 1265 Data truncated for column 'start' at row 1
SELECT * FROM ranges;
id start end
1 0000-01-01 00:00:00 2012-10-05 23:59:59
1 1990-01-01 00:00:00 2012-10-05 23:59:59
DROP TABLE ranges;
Expand Up @@ -27,11 +27,11 @@ CREATE TABLE ranges (
UNIQUE KEY range_key(start, end)
);

INSERT INTO ranges VALUES (1, "0000-00-00 00:00:00", "2012-10-05 23:59:59");
INSERT INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59");
SELECT * FROM ranges;

DELETE FROM ranges WHERE id = 1;
INSERT INTO ranges VALUES (1, "0000-00-00 00:00:00", "2012-10-05 23:59:59");
INSERT INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59");
SELECT * FROM ranges;

DROP TABLE ranges;
Expand Down

0 comments on commit 93ce8ec

Please sign in to comment.