1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Use relative dates so that the tests don't fail when the year

changes.
This commit is contained in:
cmiller@zippy.cornsilk.net
2007-01-06 18:32:55 -05:00
parent b54f20f865
commit 95e73e66f0
2 changed files with 6 additions and 6 deletions

View File

@@ -2675,9 +2675,9 @@ lName varchar(25) NOT NULL,
DOB date NOT NULL,
uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1(fName, lName, DOB) VALUES
('Hank', 'Hill', '1964-09-29'),
('Tom', 'Adams', '1908-02-14'),
('Homer', 'Simpson', '1968-03-05');
('Alice', 'Hill', date_sub(curdate(), interval 15271 day)),
('Bob', 'Adams', date_sub(curdate(), interval 33600 day)),
('Carol', 'Simpson', date_sub(curdate(), interval 13700 day));
CREATE VIEW v1 AS
SELECT (year(now())-year(DOB)) AS Age
FROM t1 HAVING Age < 75;

View File

@@ -2544,9 +2544,9 @@ CREATE TABLE t1(
uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1(fName, lName, DOB) VALUES
('Hank', 'Hill', '1964-09-29'),
('Tom', 'Adams', '1908-02-14'),
('Homer', 'Simpson', '1968-03-05');
('Alice', 'Hill', date_sub(curdate(), interval 15271 day)),
('Bob', 'Adams', date_sub(curdate(), interval 33600 day)),
('Carol', 'Simpson', date_sub(curdate(), interval 13700 day));
CREATE VIEW v1 AS
SELECT (year(now())-year(DOB)) AS Age