Closed
Bug 290277
Opened 20 years ago
Closed 20 years ago
Index renaming may fail if misnamed PRIMARY indexes exist
Categories
(Bugzilla :: Installation & Upgrading, defect, P1)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: mkanat, Assigned: mkanat)
References
Details
Attachments
(1 file)
|
1.82 KB,
patch
|
bugreport
:
review+
|
Details | Diff | Splinter Review |
There are some versions of mysqldump that will incorrectly rename any unique index on a table to "PRIMARY", if the table doesn't have a primary key. This means that some people who have restored Bugzilla from a backup have indexes incorrectly named as "PRIMARY" in their database. So, for all the tables that have unique indexes but lack a primary key, we should put a "PRIMARY" index into the "bad_names" hash to be dropped from that table and re-created if found.
| Assignee | ||
Updated•20 years ago
|
Flags: blocking2.20?
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.20
| Assignee | ||
Updated•20 years ago
|
Assignee: installation → mkanat
| Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•20 years ago
|
||
OK, this is a pretty straightforward patch. We just tell the index-renaming code to also look for indexes named "PRIMARY" on any table that currently has a UNIQUE index but no primary key.
Attachment #180752 -
Flags: review?(bugreport)
| Assignee | ||
Comment 2•20 years ago
|
||
Comment on attachment 180752 [details] [diff] [review] Fix indexes named PRIMARY Wait, I actually have to test something, here, first. :-)
Attachment #180752 -
Flags: review?(bugreport)
| Assignee | ||
Comment 3•20 years ago
|
||
Comment on attachment 180752 [details] [diff] [review] Fix indexes named PRIMARY OK, yeah, this will work, because we already do a backtick on the names of indexes when we drop them. Normally PRIMARY is a keyword, and it has to be enclosed in backticks in a SQL command, but we've already done that in Bugzilla::DB::Schema::Mysql::get_drop_index_ddl.
Attachment #180752 -
Flags: review?(bugreport)
Comment 4•20 years ago
|
||
"If it's not a regression from 2.18 and it's not a critical problem with something that's already landed, let's push it off." - Dave
Flags: blocking2.20?
Updated•20 years ago
|
Flags: blocking2.20-
Updated•20 years ago
|
Attachment #180752 -
Flags: review?(bugreport) → review+
| Assignee | ||
Updated•20 years ago
|
Flags: approval?
Comment 5•20 years ago
|
||
(In reply to comment #4) > "If it's not a regression from 2.18 and it's not a critical problem with > something that's already landed, let's push it off." - Dave This counts as a critical problem with something that's already landed (the index-renaming code in checksetup.pl).
Flags: blocking2.20-
Flags: blocking2.20+
Flags: approval?
Flags: approval+
| Assignee | ||
Comment 6•20 years ago
|
||
Checking in Bugzilla/DB/Mysql.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm,v <-- Mysql.pm new revision: 1.16; previous revision: 1.15 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•