MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:gluh Date:October 10 2007 7:16am
Subject:bk commit into 5.0 tree (gluh:1.2556) BUG#25359
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-10-10 12:16:13+05:00, gluh@stripped +2 -0
  Bug#25359 Test 'view' is dependent on current year to be 2006
  removed now() call to make the test to be year independent

  mysql-test/r/view.result@stripped, 2007-10-10 12:16:12+05:00, gluh@stripped +8 -7
    result fix

  mysql-test/t/view.test@stripped, 2007-10-10 12:16:12+05:00, gluh@stripped +7 -6
    removed now() call to make the test to be year independent

diff -Nrup a/mysql-test/r/view.result b/mysql-test/r/view.result
--- a/mysql-test/r/view.result	2007-09-24 17:34:09 +05:00
+++ b/mysql-test/r/view.result	2007-10-10 12:16:12 +05:00
@@ -2706,18 +2706,19 @@ CREATE TABLE t1(
 fName varchar(25) NOT NULL,
 lName varchar(25) NOT NULL,
 DOB date NOT NULL,
+test_date 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');
+INSERT INTO t1(fName, lName, DOB, test_date) VALUES
+('Hank', 'Hill', '1964-09-29', '2007-01-01'),
+('Tom', 'Adams', '1908-02-14', '2007-01-01'),
+('Homer', 'Simpson', '1968-03-05', '2007-01-01');
 CREATE VIEW v1 AS
-SELECT (year(now())-year(DOB)) AS Age
+SELECT (year(test_date)-year(DOB)) AS Age
 FROM t1 HAVING Age < 75;
 SHOW CREATE VIEW v1;
 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;
+v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(`t1`.`test_date`) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75)
+SELECT (year(test_date)-year(DOB)) AS Age FROM t1 HAVING Age < 75;
 Age
 43
 39
diff -Nrup a/mysql-test/t/view.test b/mysql-test/t/view.test
--- a/mysql-test/t/view.test	2007-09-24 17:34:09 +05:00
+++ b/mysql-test/t/view.test	2007-10-10 12:16:12 +05:00
@@ -2548,19 +2548,20 @@ CREATE TABLE t1(
   fName varchar(25) NOT NULL,
   lName varchar(25) NOT NULL,
   DOB date NOT NULL,
+  test_date 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');
+INSERT INTO t1(fName, lName, DOB, test_date) VALUES
+  ('Hank', 'Hill', '1964-09-29', '2007-01-01'),
+  ('Tom', 'Adams', '1908-02-14', '2007-01-01'),
+  ('Homer', 'Simpson', '1968-03-05', '2007-01-01');
 
 CREATE VIEW v1 AS
-  SELECT (year(now())-year(DOB)) AS Age
+  SELECT (year(test_date)-year(DOB)) AS Age
     FROM t1 HAVING Age < 75; 
 SHOW CREATE VIEW v1;           
 
-SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
+SELECT (year(test_date)-year(DOB)) AS Age FROM t1 HAVING Age < 75;
 SELECT * FROM v1;
 
 DROP VIEW v1;
Thread
bk commit into 5.0 tree (gluh:1.2556) BUG#25359gluh10 Oct