Closed Bug 1260458 Opened 8 years ago Closed 8 years ago

search failing for users who are not members of the insider group (DBD::mysql::db selectcol_arrayref failed: You have an error in your SQL syntax)

Categories

(bugzilla.mozilla.org :: Search, defect, P1)

Production
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: alice0775, Assigned: dkl)

References

()

Details

Attachments

(1 file)

STR:
Login
Search > Advanced Search
Type "Web worker sandbox"(without "") in Summary
Click [Search]

Actual Results:

Bugzilla has suffered an internal error:

DBD::mysql::db selectcol_arrayref failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND longdescs_2.isprivate = 0 WHERE bugs.creation_ts IS NOT NULL AND (securi' at line 5 [for Statement "SELECT bugs.bug_id AS bug_id FROM bugs LEFT JOIN bug_group_map AS security_map ON bugs.bug_id = security_map.bug_id AND NOT ( security_map.group_id IN (19,10,9,119,69) ) LEFT JOIN cc AS security_cc ON bugs.bug_id = security_cc.bug_id AND security_cc.who = 293623 LEFT JOIN longdescs AS longdescs_2 ON bugs.bug_id = longdescs_2.bug_id AND AND longdescs_2.isprivate = 0 WHERE bugs.creation_ts IS NOT NULL AND (security_map.group_id IS NULL OR (bugs.reporter_accessible = 1 AND bugs.reporter = 293623) OR (bugs.cclist_accessible = 1 AND security_cc.who IS NOT NULL) OR bugs.assigned_to = 293623 OR bugs.qa_contact = 293623) AND (INSTR(bugs.short_desc, 'Web') > 0 AND INSTR(bugs.short_desc, 'worker') > 0 AND INSTR(bugs.short_desc, 'sandbox') > 0) AND bugs.resolution IN ('','DUPLICATE') AND longdescs_2.comment_id IS NOT NULL GROUP BY bugs.bug_id ORDER BY bug_id LIMIT 500 "]
Blocks: 1260421
No longer blocks: 1260421
> .. LEFT JOIN longdescs AS longdescs_2 ON bugs.bug_id = longdescs_2.bug_id AND AND longdescs_2.isprivate = 0 ..

note the double ANDs.
this won't fail if you're a member of the insider group.
Component: General → Search
Priority: -- → P1
Summary: Bugzilla has suffered an internal error: DBD::mysql::db selectcol_arrayref failed → search failing for users who are not members of the insider group (DBD::mysql::db selectcol_arrayref failed: You have an error in your SQL syntax)
Attached patch 1260458_1.patchSplinter Review
If you have an one or more empty spaces in the comment input on the advanced page, or possibly other places, I was able to get this error to occur. This patch should fixes the issue for me.

dkl
Assignee: nobody → dkl
Status: NEW → ASSIGNED
Attachment #8737930 - Flags: review?(dylan)
Comment on attachment 8737930 [details] [diff] [review]
1260458_1.patch

Review of attachment 8737930 [details] [diff] [review]:
-----------------------------------------------------------------

r=dylan
Attachment #8737930 - Flags: review?(dylan) → review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   236c0b9..ea817b4  master -> master
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: