Closed
Bug 253360
Opened 19 years ago
Closed 19 years ago
IF() should be replaced by CASE WHEN
Categories
(Bugzilla :: Bugzilla-General, defect)
Bugzilla
Bugzilla-General
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: Tomas.Kopal, Assigned: Tomas.Kopal)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
4.01 KB,
patch
|
goobix
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20040721 Debian/1.7.1-2 Build Identifier: As IF(cond, exp1, exp2) function is MySQL specific, we should replace it with CASE WHEN cond THEN exp1 ELSE exp2 END, which is supported by all major databases (see bug 182136). The patch will follow Reproducible: Always Steps to Reproduce:
Comment 1•19 years ago
|
||
Since when does MySQL support it?
Assignee | ||
Comment 2•19 years ago
|
||
Assignee | ||
Updated•19 years ago
|
Attachment #154536 -
Flags: review?
Assignee | ||
Updated•19 years ago
|
Assignee | ||
Comment 3•19 years ago
|
||
"CASE was added in MySQL 3.23.3" (see http://dev.mysql.com/doc/mysql/en/Control_flow_functions.html). I think we currently require 3.23.3 or higher, right?
Comment 4•19 years ago
|
||
yeah, just found that in the changelog myself before coming back here. How interesting. Yes, we currently require 3.23.41 or newer, so that shouldn't be a problem at all. (Although I do think IF() is easier to read, but compatibility rules...)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•19 years ago
|
Attachment #154536 -
Flags: review? → review+
Updated•19 years ago
|
Assignee: justdave → Tomas.Kopal
Flags: approval?
Target Milestone: --- → Bugzilla 2.20
Updated•19 years ago
|
Flags: approval? → approval+
Comment 5•19 years ago
|
||
Checking in editgroups.cgi; /cvsroot/mozilla/webtools/bugzilla/editgroups.cgi,v <-- editgroups.cgi new revision: 1.41; previous revision: 1.40 done Checking in editusers.cgi; /cvsroot/mozilla/webtools/bugzilla/editusers.cgi,v <-- editusers.cgi new revision: 1.68; previous revision: 1.67 done Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.211; previous revision: 1.210 done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•