Replace "INTERVAL" with Bugzilla::DB function call

RESOLVED FIXED in Bugzilla 2.20

Status

()

Bugzilla
Bugzilla-General
--
enhancement
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: Tomas Kopal, Assigned: Tomas Kopal)

Tracking

unspecified
Bugzilla 2.20
Bug Flags:
approval +

Details

Attachments

(1 attachment)

V1
7.79 KB, patch
Max Kanat-Alexander
: review+
Details | Diff | Splinter Review
(Assignee)

Description

13 years ago
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:
(Assignee)

Updated

13 years ago
Blocks: 280493
(Assignee)

Comment 1

13 years ago
Created attachment 174675 [details] [diff] [review]
V1

Patch replacing INTERVAL SQL with DB method call.
Attachment #174675 - Flags: review?

Updated

13 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → Bugzilla 2.20

Updated

13 years ago
Assignee: general → Tomas.Kopal
Status: ASSIGNED → NEW

Comment 2

13 years ago
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 3

13 years ago
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+

Comment 4

13 years ago
There's a bit of bitrot from another patch in this series, but it can be worked
around.
Flags: approval?
(Assignee)

Comment 5

13 years ago
(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+

Comment 6

13 years ago
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
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.