Bug 3457 - [review] BayesSQL tests do not function properly for MySQL < 4.1
Summary: [review] BayesSQL tests do not function properly for MySQL < 4.1
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Regression Tests (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other other
: P5 normal
Target Milestone: 3.0.0
Assignee: Michael Parker
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-02 11:00 UTC by Michael Parker
Modified: 2004-06-02 14:38 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
Patch File patch None Michael Parker [HasCLA]
Patch File patch None Michael Parker [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Parker 2004-06-02 11:00:06 UTC
The bayessql.t tests use a sub-select to delete the test data from the database.
 Using on a version < 4.1 causes an error.
Comment 1 Michael Parker 2004-06-02 11:00:50 UTC
Needs to be fixed for 3.0.0
Comment 2 Michael Parker 2004-06-02 11:41:45 UTC
Created attachment 1990 [details]
Patch File
Comment 3 Michael Parker 2004-06-02 11:42:26 UTC
Fixed, please review attached patch and provide +1s and I'll commit.
Comment 4 Malte S. Stretz 2004-06-02 12:13:25 UTC
+1 so far. 
 
But maybe you should add another final SELECT to see if clear_database() 
really emptied the table (ie. there's no bug in the clear routine). 
Comment 5 Justin Mason 2004-06-02 12:33:20 UTC
+1 on that -- agree with Malte though that an extra step to check would be nice
Comment 6 Michael Parker 2004-06-02 13:39:54 UTC
Created attachment 1991 [details]
Patch File

New patch file that adds a test to make sure clear_database actually cleared
the database.  It's not as clean as I'd like it but works and I plan to change
the SQL code for 3.1.0 to allow it to be much cleaner.

Please review again.
Comment 7 Justin Mason 2004-06-02 13:58:28 UTC
+1, I like it ;)

(BTW, if you ask me, breaking abstraction in the test suite is fine, as long as
it's the test suite bundled with the code in the first place.)
Comment 8 Malte S. Stretz 2004-06-02 14:44:41 UTC
+1 on 1991 -- I can't actually test it but it looks cool :) 
Comment 9 Michael Parker 2004-06-02 22:38:45 UTC
Committed revision 20771