Closed Bug 280502 Opened 20 years ago Closed 19 years ago

Replace "INTERVAL" with Bugzilla::DB function call

Categories

(Bugzilla :: Bugzilla-General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: Tomas.Kopal, Assigned: Tomas.Kopal)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050110 Firefox/1.0 (Debian package 1.0+dfsg.1-2)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050110 Firefox/1.0 (Debian package 1.0+dfsg.1-2)

"INTERVAL" has MySQL specific syntax and should be replaced with DB
agnostic call to function in the DB compatibility layer.

Reproducible: Always

Steps to Reproduce:
Blocks: 280493
Attached patch V1Splinter Review
Patch replacing INTERVAL SQL with DB method call.
Attachment #174675 - Flags: review?
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → Bugzilla 2.20
Assignee: general → Tomas.Kopal
Status: ASSIGNED → NEW
Are DATE_SUB and DATE_ADD themselves actually Pg-compatible? Pg normally uses
the +/- operators for that, I thought.

It seems like it might be cleaner to just re-work some of those, too...

But otherwise I'll give this a review+.
Status: NEW → ASSIGNED
Comment on attachment 174675 [details] [diff] [review]
V1

That is, this is review+.

If we want to re-work it to be cleaner later, we can do that.
Attachment #174675 - Flags: review? → review+
There's a bit of bitrot from another patch in this series, but it can be worked
around.
Flags: approval?
(In reply to comment #2)
> Are DATE_SUB and DATE_ADD themselves actually Pg-compatible? Pg normally uses
> the +/- operators for that, I thought.
> 
> It seems like it might be cleaner to just re-work some of those, too...
> 
> But otherwise I'll give this a review+.

They are not compatible, but +/- works on both MySQL and Pg AFAIK. But I think
that should go in a separate patch (will follow shortly :-) ).
Flags: approval? → approval+
Checking in sanitycheck.cgi;
/cvsroot/mozilla/webtools/bugzilla/sanitycheck.cgi,v  <--  sanitycheck.cgi
new revision: 1.80; previous revision: 1.79
done
Checking in userprefs.cgi;
/cvsroot/mozilla/webtools/bugzilla/userprefs.cgi,v  <--  userprefs.cgi
new revision: 1.67; previous revision: 1.66
done
Checking in whine.pl;
/cvsroot/mozilla/webtools/bugzilla/whine.pl,v  <--  whine.pl
new revision: 1.8; previous revision: 1.7
done
Checking in Bugzilla/Search.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v  <--  Search.pm
new revision: 1.81; previous revision: 1.80
done
Checking in Bugzilla/Token.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Token.pm,v  <--  Token.pm
new revision: 1.28; previous revision: 1.27
done
Checking in contrib/sendunsentbugmail.pl;
/cvsroot/mozilla/webtools/bugzilla/contrib/sendunsentbugmail.pl,v  <-- 
sendunsentbugmail.pl
new revision: 1.2; previous revision: 1.1
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: