Closed Bug 277303 Opened 20 years ago Closed 20 years ago

checksetup.pl emits a syntax error when trying to fix indexes on the milestones table

Categories

(Bugzilla :: Installation & Upgrading, defect)

2.18
defect
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: pds, Assigned: mkanat)

Details

Attachments

(1 file)

While attempting to upgrade from 2.16.1 to 2.18 tip-of-branch, I encountered an error in the checksetup.pl script. At line 3343 in the script, the PrintWarn parameter of the DBI handle is queried. This parameter does not exist in DBI version 1.38, but the script states that only version 1.36 of the DBI module is required. For whatever its worth, the adjusting of the PrintWarn parameter may not be achieving its attended purpose when used with DBI version 1.46. When I use version 1.46 of the DBI module, I always noticed the following error message when doing the upgrade: DBD::mysql::db do failed: You have an error in your SQL syntax near 'PRIMARY' at line 1 at checksetup.pl line 3345. I have been testing with MySQL 3.23.53a on RedHat 9 and MySQL 4.0.23-debug on Windows XP. I am not sure whether this information might be useful in deciding how to fix this bug or is indicative of a second bug.
Crap. If that is true, it's my fault.
Assignee: zach → mkanat
Flags: approval2.18?
Arrrgghh, that's the second time I've done that. And now I can't clear it, because of that bug...
Flags: blocking2.18?
Flags: blocking2.20+
Flags: blocking2.18?
Flags: blocking2.18+
Flags: approval2.18?
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.18
Actually, here's the real problem: <avatraxiom> ALTER TABLE milestones DROP INDEX PRIMARY; <avatraxiom> ERROR 1064: You have an error in your SQL syntax near 'PRIMARY' at line 1 <avatraxiom> Um, what?? <avatraxiom> It doesn't just say that PRIMARY is a bad index. It actually said that I have *bad syntax*. I'm not sure why I didn't catch that when I originally wrote the patch...
Status: UNCONFIRMED → NEW
Ever confirmed: true
I've changed the summary to reflect something that's actually a problem. If the DBI that you're using doesn't support PrintWarn, it just won't do anything, right? That is, does it actually throw an error when it tries to set PrintWarn?
Summary: checksetup.pl uses DBI:PrintWarn parameter which requires newer DBI → checksetup.pl emits a syntax error when trying to fix indexes on the milestones table
Attached patch Much better fixSplinter Review
OK, this is actually a wholly better fix than the fix that I originally checked in here.
Attachment #170513 - Flags: review?(travis)
Whiteboard: patch awaiting review
As I attempted, but apparently failed, to make clear in my original report, I observed two different problems with version 1.46 of the DBI module I checksetup.pl reported the SQL syntax error. With version 1.38 of the DBI module, however, the checksetup.pl script aborted, or at least appeared to abort, at line 3343, i.e. two lines before the SQL syntax error, and complained about the PrintWarn parameter. All that said, I would expect that your new patch will solve both problems.
Max, if you're interested, open up r? -- you'd get r=wurblzap.
Attachment #170513 - Flags: review?(travis) → review?
OK, go ahead. :-)
Comment on attachment 170513 [details] [diff] [review] Much better fix This is what is done in other places -- drop the index, then re-create it. r=wurblzap by inspection.
Attachment #170513 - Flags: review? → review+
Flags: approval?
Flags: approval2.18?
Whiteboard: patch awaiting review → patch awaiting approval
Severity: normal → major
Flags: approval?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval+
Whiteboard: patch awaiting approval → patch awaiting checkin
Checking in checksetup.pl; /cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl new revision: 1.322; previous revision: 1.321 done Checking in checksetup.pl; /cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl new revision: 1.289.2.20; previous revision: 1.289.2.19 done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: patch awaiting checkin
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: