SQL error in sanitycheck.cgi

RESOLVED FIXED in Bugzilla 2.20

Status

()

Bugzilla
Administration
--
critical
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: Cédric Caron, Assigned: Frédéric Buclin)

Tracking

2.19.2
Bugzilla 2.20
Bug Flags:
approval +

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
I executed a saniti check and received the folowing error message:

Software error:
DBD::mysql::st execute failed: Unknown column 'whine_schedules.mailto_userid' 
in 'field list' [for Statement "SELECT DISTINCT whine_schedules.mailto_userid 
FROM   whine_schedules LEFT JOIN profiles   ON   whine_schedules.mailto_userid 
= profiles.userid WHERE  profiles.userid IS NULL   AND  
whine_schedules.mailto_userid IS NOT NULL"] at Bugzilla/DB.pm line 68
	Bugzilla::DB::SendSQL('SELECT DISTINCT whine_schedules.mailto_userid 
FROM   whine_sc...') called at C:\Inetpub\Orchid\Bugs\sanitycheck.cgi line 260
	main::CrossCheck('profiles', 'userid', 'ARRAY(0x1e30678)', 'ARRAY
(0x22c54ac)', 'ARRAY(0x1e307d4)', 'ARRAY(0x23244d8)', 'ARRAY
(0x22c54b8)', 'ARRAY(0x2342284)', 'ARRAY(0x234232c)', ...) called at 
C:\Inetpub\Orchid\Bugs\sanitycheck.cgi line 319

For help, please send mail to this site's webmaster, giving this error message 
and the time and date of the error. 

[Sat Feb 19 13:25:39 2005] sanitycheck.cgi: DBD::mysql::st execute failed: 
Unknown column 'whine_schedules.mailto_userid' in 'field list' [for 
Statement "SELECT DISTINCT whine_schedules.mailto_userid FROM whine_schedules 
LEFT JOIN profiles ON whine_schedules.mailto_userid = profiles.userid WHERE 
profiles.userid IS NULL AND whine_schedules.mailto_userid IS NOT NULL"] at 
Bugzilla/DB.pm line 68 [Sat Feb 19 13:25:39 2005] sanitycheck.cgi: 
Bugzilla::DB::SendSQL('SELECT DISTINCT whine_schedules.mailto_userid FROM 
whine_sc...') called at C:\Inetpub\Orchid\Bugs\sanitycheck.cgi line 260 [Sat 
Feb 19 13:25:39 2005] sanitycheck.cgi: main::CrossCheck
('profiles', 'userid', 'ARRAY(0x1e30678)', 'ARRAY(0x22c54ac)', 'ARRAY
(0x1e307d4)', 'ARRAY(0x23244d8)', 'ARRAY(0x22c54b8)', 'ARRAY
(0x2342284)', 'ARRAY(0x234232c)', ...) called at 
C:\Inetpub\Orchid\Bugs\sanitycheck.cgi line 319
(Assignee)

Comment 1

14 years ago
I'm surprised by this error message. 'whine_schedules.mailto_userid' actually is
a valid column name. This message seems to appear when doing a CrossCheck at
line 319.

I cannot reproduce using the latest cvs version of Bugzilla. -> WFM!

Cédric, can you reproduce this error message again? If yes, have you installed
the official 2.19.2 release of Bugzilla or is it a more recent one? Maybe did
you play with your DB and it is now corrupted? ;)
(Assignee)

Comment 2

14 years ago
Oops! Cédric, you are right! I just updated my installation to the very latest
CVS version (mine was 24 hours old ;) ) and I can now reproduce this SQL error
message. This is due to the checkin of Erik's patch from bug 253721 which
renames the 'mailto_userid' column. Marc's patch in bug 266137 has to be
updated. Nice catch!
Severity: normal → critical
Flags: blocking2.20?
OS: Windows 2000 → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.20
(Assignee)

Comment 3

14 years ago
Created attachment 174798 [details] [diff] [review]
remove mailto_userid from the cross-check, v1
Assignee: administration → LpSolit
Status: NEW → ASSIGNED
Attachment #174798 - Flags: review?(bugreport)

Comment 4

14 years ago
Comment on attachment 174798 [details] [diff] [review]
remove mailto_userid from the cross-check, v1

r=joel
At some point, we'll have to add a more comprehensive check in sanitycheck, but
that is another bug
Attachment #174798 - Flags: review?(bugreport) → review+

Updated

14 years ago
Flags: approval?
(Assignee)

Comment 5

14 years ago
(In reply to comment #3)
> Created an attachment (id=174798) [edit]
> remove mailto_userid from the cross-check, v1
> 

FYI, it's not correct to change ['whine_schedules', 'mailto_userid'] to
['whine_schedules', 'mailto'] as 'mailto' now can be either a user ID or a group
ID. The the best thing to do for now is to remove this check completely.
(In reply to comment #5)
> FYI, it's not correct to change ['whine_schedules', 'mailto_userid'] to
> ['whine_schedules', 'mailto'] as 'mailto' now can be either a user ID or a group
> ID.

Ewww...  how's that ever going to work once we have referential integrity?  Oh
well, fix the current problem now, we can deal with that later I guess.
Flags: blocking2.20?
Flags: approval?
Flags: approval+

Comment 7

14 years ago
checked in for LpSolit
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.