URL gives sql error when loaded

VERIFIED FIXED in Bugzilla 2.12

Status

()

P3
normal
VERIFIED FIXED
18 years ago
6 years ago

People

(Reporter: bugzilla, Assigned: endico)

Tracking

unspecified
Bugzilla 2.12
Other
Windows 98

Details

(Whiteboard: 2.12, URL)

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
select bugs.bug_id, product, version, rep_platform, op_sys, bug_status, 
resolution, priority, bug_severity, component, assigned_to, reporter, 
bug_file_loc, short_desc, target_milestone, qa_contact, status_whiteboard, 
date_format(creation_ts,'%Y-%m-%d %H:%i'), groupset, delta_ts, sum(votes.count) 
from bugs left join votes using(bug_id) where bugs.bug_id = 46872 and 
bugs.groupset & = bugs.groupset group by bugs.bug_id: You have an error in your 
SQL syntax near '= bugs.groupset group by bugs.bug_id' at line 10 at globals.pl 
line 134.

Comment 1

18 years ago
I would resolve this "worksforme" -- tried the URL above and all was happiness.
(Reporter)

Comment 2

18 years ago
Try it again, because it still gives the same sql error message for me.  
(Reporter)

Comment 3

18 years ago
Further testing shows the bug has mysteriously disappeared, even for larger 
urls.  Marking WORKSFORME.
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → WORKSFORME
It's still there.  Reopening.  The difference:  I wasn't logged in yet when I 
tried it.  If you're logged in, it works.  If you're not logged in, you get an 
error.

Apparently when you're not logged in, $::usergroupset is getting set to null, 
when it should be getting set to 0.  My guess is that something's goofed in 
quietly_check_login() in CGI.pl.

fyi, the new bugzilla server's giving funky error messages...

<?xml version="1.0" standalone="no"?>
<!DOCTYPE bugzilla SYSTEM "http://bugzilla.mozilla.org/bugzilla.dtd">
<bugzilla version="2.11" urlbase="http://bugzilla.mozilla.org/" maintainer=
"dmose@mozilla.org">
Content-type: text/html

<H1>Software error:</H1>
<CODE>
    select
      bugs.bug_id, product, version, rep_platform, op_sys, bug_status,
      resolution, priority, bug_severity, component, assigned_to, reporter,
      bug_file_loc, short_desc, target_milestone, qa_contact,
      status_whiteboard, date_format(creation_ts,'%Y-%m-%d %H:%i'),
      groupset, delta_ts, sum(votes.count)
    from bugs left join votes using(bug_id)
    where bugs.bug_id = 46872
    and bugs.groupset &  = bugs.groupset
    group by bugs.bug_id: You have an error in your SQL syntax near '= 
bugs.groupset
    group by bugs.bug_id' at line 10 at globals.pl line 134.
</CODE>
<P>
Please send mail to this site's webmaster for help.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Found the bug.  Not in CGI.pl, but in Bug.pm.  It takes

Attaching a patch to fix it.
Created attachment 12400 [details] [diff] [review]
Patch to fix missing groupset in SQL
Can't find any proof (queries are being weird on me?) but I think Dawn was in on 
creating Bug.pm.  If so, I'd like her review on this before it gets checked in.

Comment 8

18 years ago
reassigning to endico for her feedback, also flagging as possible 2.12
Assignee: tara → endico
Status: REOPENED → NEW
Whiteboard: 2.12
Checked in patch.
Status: NEW → RESOLVED
Last Resolved: 18 years ago18 years ago
Resolution: --- → FIXED

Comment 10

18 years ago
Sorry for the spam, but I needed to be able to query for all of these correctly.
Target Milestone: --- → Bugzilla 2.12

Comment 11

18 years ago
V.
Status: RESOLVED → VERIFIED
Moving closed bugs to Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Version: other → unspecified
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.