Fix for view.test.

the result should be added by 1 by the year(now()) function.


mysql-test/r/view.result:
  SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75; 
  the above statement in test file has a year(now()) function, 
  the result should increase by 1 from 2007 year to 2008 year.
This commit is contained in:
unknown 2008-01-09 14:51:08 +08:00
parent 64f02f7db4
commit 9b14ac8d01

View file

@ -2698,12 +2698,12 @@ View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(now()) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75)
SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
Age
43
39
44
40
SELECT * FROM v1;
Age
43
39
44
40
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a char(6) DEFAULT 'xxx');