From 6699c492555b2a25d7e6721df5d057cbb8a97410 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 8 Jan 2008 04:24:19 +0000 Subject: [PATCH] Dike out regression test that is guaranteed to stop working after a year. I thought upstream would have acquired a clue after it failed last year at this time, but it seems not. --- mysql-ss-test.patch | 39 +++++++++++++++++++++++++++++++++++++++ mysql.spec | 8 +++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 mysql-ss-test.patch diff --git a/mysql-ss-test.patch b/mysql-ss-test.patch new file mode 100644 index 0000000..30b4b71 --- /dev/null +++ b/mysql-ss-test.patch @@ -0,0 +1,39 @@ +You'd think MySQL AB would have learned last year that a test that's designed +to fail next January 1st isn't a good idea. Short-sightedness seems to still +reign supreme over there, however. We will dike out this test, and we will +not put it back as long as it's designed to depend on the value of now(). +Whatever bit of testing coverage we might lose here is not worth packages +that break annually. + + +diff -Naur mysql-5.0.45.orig/mysql-test/r/view.result mysql-5.0.45/mysql-test/r/view.result +--- mysql-5.0.45.orig/mysql-test/r/view.result 2007-07-04 09:49:09.000000000 -0400 ++++ mysql-5.0.45/mysql-test/r/view.result 2008-01-07 22:26:00.000000000 -0500 +@@ -2709,14 +2709,6 @@ + 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; +-Age +-43 +-39 +-SELECT * FROM v1; +-Age +-43 +-39 + DROP VIEW v1; + DROP TABLE t1; + CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a char(6) DEFAULT 'xxx'); +diff -Naur mysql-5.0.45.orig/mysql-test/t/view.test mysql-5.0.45/mysql-test/t/view.test +--- mysql-5.0.45.orig/mysql-test/t/view.test 2007-07-04 09:49:09.000000000 -0400 ++++ mysql-5.0.45/mysql-test/t/view.test 2008-01-07 22:25:44.000000000 -0500 +@@ -2560,9 +2560,6 @@ + FROM t1 HAVING Age < 75; + SHOW CREATE VIEW v1; + +-SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75; +-SELECT * FROM v1; +- + DROP VIEW v1; + DROP TABLE t1; + diff --git a/mysql.spec b/mysql.spec index 7d487d2..d94037f 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,6 +1,6 @@ Name: mysql Version: 5.0.45 -Release: 6%{?dist} +Release: 7%{?dist} Summary: MySQL client programs and shared libraries Group: Applications/Databases URL: http://www.mysql.com @@ -31,6 +31,7 @@ Patch10: mysql-bdb-open.patch Patch11: mysql-innodb-crash.patch Patch12: mysql-rename-bug.patch Patch13: mysql-view-bug.patch +Patch14: mysql-ss-test.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gperf, perl, readline-devel, openssl-devel @@ -139,6 +140,7 @@ the MySQL sources. %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 libtoolize --force aclocal @@ -480,6 +482,10 @@ fi %{_mandir}/man1/mysql_client_test.1* %changelog +* Mon Jan 7 2008 Tom Lane 5.0.45-7 +- Unbelievable ... upstream still thinks that it's a good idea to have a + regression test that is guaranteed to begin failing come January 1. + * Thu Dec 13 2007 Tom Lane 5.0.45-6 - Back-port upstream fixes for CVE-2007-5925, CVE-2007-5969, CVE-2007-6303. Related: #422211