Open Bug 282493 Opened 20 years ago Updated 12 years ago

New runtests script for non-db-compatible code

Categories

(Bugzilla :: Testing Suite, enhancement)

2.19.2
enhancement
Not set
normal

Tracking

()

People

(Reporter: mkanat, Unassigned)

References

Details

An excellent email from Joel: You should add a runtests.pl test that helps find any new cases of non-cross-db code. It would probably require a long list of exceptions initially, but the list should monotonically shrink. ---------- So what I think we'll do is we'll just check this in after bug 280493, and then the only exceptions will be files in the Bugzilla/DB/ directory. Here's the SQL we need to look for and tell people to replace with Bugzilla::DB functions: LOCK TABLES / UNLOCK TABLES REGEXP / NOT REGEXP LIMIT TO_DAYS DATE_FORMAT INTERVAL CONCAT This SQL is just not compatible, and needs to be turned into something ANSI-standard or something else: IFNULL enum-type fields timestamp-type fields (column IS NOT NULL) in the SELECT REPLACE INTO All statements in a WHERE clause must have an = IF( INSERT with multiple VALUES paren-groups I'm not sure that we can test for all of those, but all of them that can be tested for should be.
Target Milestone: --- → Bugzilla 2.20
INSTR should also not be used. We have a sql_position function for it, now.
Assignee: general → zach
Component: Bugzilla-General → Testing Suite
Only security and dataloss fixes will be accepted on the 2.20 branch.
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
Target Milestone: Bugzilla 2.22 → Bugzilla 3.2
Assignee: zach → testing
Bugzilla 3.2 and 3.4 are closed for enhancement requests.
Target Milestone: Bugzilla 3.2 → ---
You need to log in before you can comment on or make changes to this bug.