Closed
Bug 398986
Opened 18 years ago
Closed 18 years ago
Incorrect SQL query when moving bugs to another product
Categories
(Bugzilla :: Creating/Changing Bugs, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.2
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
(Keywords: regression)
Attachments
(1 file)
|
782 bytes,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
'?' x 5 means '?????', which is not what we want as join()'ing this string has no effect.
('?') x 5 means ('?','?','?','?','?'), which is the expected array as join()'ing this will give '?,?,?,?,?'.
This is a regression due to bug 373689. Note that we could as well write:
join(', ', @idlist)
as I did in the original implementation of this code.
Flags: blocking3.1.3+
Attachment #283987 -
Flags: review?(mkanat)
| Assignee | ||
Comment 1•18 years ago
|
||
FYI, running PostgreSQL displays a blank page instead of the intermediate page.
Comment 2•18 years ago
|
||
Comment on attachment 283987 [details] [diff] [review]
patch, v1
Hrm, okay. The docs said that in list context the "x" operator returns a list. Ah well.
Attachment #283987 -
Flags: review?(mkanat) → review+
Comment 3•18 years ago
|
||
By the way, one reason that we do ('?') x @idlist instead of "join(',', @idlist)" is that the query analyzer can cache this query, and it can't cache the query with numbers in it. Also, I think it's always better to use placeholders where it's reasonable to use them.
| Assignee | ||
Updated•18 years ago
|
Flags: approval+
| Assignee | ||
Comment 4•18 years ago
|
||
Checking in Bugzilla/Bug.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm
new revision: 1.208; previous revision: 1.207
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•