Closed
Bug 78276
Opened 24 years ago
Closed 20 years ago
change name of "when" index on bugs_activity.bug_when column
Categories
(Bugzilla :: Installation & Upgrading, defect, P2)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: myk, Assigned: mkanat)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
The BugZilla database has an index called "when" which indexes the "bug_when"
column of the "bugs_activity" table. This appears to be a relic of an old
naming scheme on b.m.o, since that index is called "bug_when" in new Bugzilla
installations.
"When" is a reserved keyword in MySQL, but it is not quoted in the nightly
backup file, so importing that file into MySQL fails with a syntax error. This
means that if we ever need to use our backup file we aren't going to be able to
do so unless we edit it, which is non-trivial on a file greater than 800MB in
size. Therefore this index needs to be renamed from "when" to some other name
that isn't a MySQL reserved word, like "bug_when".
Comment 1•20 years ago
|
||
justdave: this seems somewhat concerning to me. Are our backups really bogus?
Gerv
Updated•20 years ago
|
Assignee: endico → justdave
Severity: normal → critical
Priority: -- → P2
Reporter | ||
Comment 2•20 years ago
|
||
Isn't this fixed by that patch that standardizes the naming of all of the indexes?
Comment 3•20 years ago
|
||
(In reply to comment #2)
> Isn't this fixed by that patch that standardizes the naming of all of the
> indexes?
more than likely... I think it drops all the existing indexes and recreates
them. Max?
If it tries to drop them by name it might still miss it.
Assignee | ||
Comment 4•20 years ago
|
||
Wow... Yeah, we won't catch that, because we check for indexes that are named
after their columns.
But with a one-line patch, we could add a check for that index, I do believe.
Severity: critical → major
Component: Bugzilla: Other b.m.o Issues → Installation & Upgrading
Product: mozilla.org → Bugzilla
Target Milestone: --- → Bugzilla 2.20
Version: other → 2.10
Assignee | ||
Updated•20 years ago
|
Assignee: justdave → mkanat
Assignee | ||
Comment 5•20 years ago
|
||
This should do it. I tested it by creating an index called "when" on
bugs_activity, and it renamed it properly.
This also exposed another bug, which I will file right now. (You'll see a "odd
number of elements" warning when you run this patch, which is the bug that was
exposed.)
Attachment #180446 -
Flags: review?(myk)
Reporter | ||
Comment 6•20 years ago
|
||
What if someone has already upgraded to a version that normalizes index names?
Won't this index never go away then?
Assignee | ||
Comment 7•20 years ago
|
||
(In reply to comment #6)
> What if someone has already upgraded to a version that normalizes index names?
> Won't this index never go away then?
(1) They would have had to have been running a version of Bugzilla previous to
2.8 at some point.
(2) They would have had to have upgraded to a VERY recent CVS version, within
the last week or two.
Can you imagine anybody in their right mind who would have done that, or a
particular reason why we should support them? :-)
Assignee | ||
Updated•20 years ago
|
Reporter | ||
Comment 8•20 years ago
|
||
Comment on attachment 180446 [details] [diff] [review]
Rename any index called "when" found on the bugs_activity table
Yeah, the likelihood is low, and the cost is minimal anyway. r=myk
Attachment #180446 -
Flags: review?(myk) → review+
Reporter | ||
Updated•20 years ago
|
Flags: approval+
Assignee | ||
Comment 9•20 years ago
|
||
Simple bitrot fix; carrying forward r+.
Attachment #180446 -
Attachment is obsolete: true
Attachment #180749 -
Flags: review+
Assignee | ||
Comment 10•20 years ago
|
||
Checking in Bugzilla/DB/Mysql.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm,v <-- Mysql.pm
new revision: 1.13; previous revision: 1.12
done
Checking in Bugzilla/DB/Schema/Mysql.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema/Mysql.pm,v <-- Mysql.pm
new revision: 1.6; previous revision: 1.5
done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
QA Contact: myk → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•