Closed Bug 1044561 Opened 10 years ago Closed 10 years ago

Bad definition of indexes for the new user_api_keys DB table

Categories

(Bugzilla :: Database, defect)

4.5.5
defect
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file)

All indexes must end with _idx, see bug 399686. The Bugzilla code expects this, see e.g. DB::Mysql::bz_setup_database(). Also, when TYPE is not set, you must not write FIELDS either. This makes checksetup.pl throw warnings:

Use of uninitialized value $index_type in string eq at Bugzilla/DB/Schema/Mysql.pm line 139.
Assignee: database → sgreen
Status: NEW → ASSIGNED
Attached patch patch, v1Splinter Review
Assignee: sgreen → LpSolit
Attachment #8463107 - Flags: review?(sgreen)
Comment on attachment 8463107 [details] [diff] [review]
patch, v1

I can't replicate the issue on perl 5.18.2 (Ubuntu 14.40 LTS)

Deriving regex group memberships...
Adding foreign key: user_api_keys.user_id -> profiles.userid...
checksetup.pl complete.

Having said that, I'm happy to accept the change.
Attachment #8463107 - Flags: review?(sgreen) → review+
Flags: approval?
(In reply to sgreen from comment #2)
> I can't replicate the issue on perl 5.18.2 (Ubuntu 14.40 LTS)

If your table has already been created, then you won't get this warning anymore.
Flags: approval? → approval+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   98041ff..8770b2c  master -> master
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: