Bad definition of indexes for the new user_api_keys DB table

RESOLVED FIXED in Bugzilla 5.0

Status

()

Bugzilla
Database
--
major
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Frédéric Buclin, Assigned: Frédéric Buclin)

Tracking

({regression})

4.5.5
Bugzilla 5.0
regression
Bug Flags:
approval +

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
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.

Updated

4 years ago
Assignee: database → sgreen
Status: NEW → ASSIGNED
(Assignee)

Comment 1

4 years ago
Created attachment 8463107 [details] [diff] [review]
patch, v1
Assignee: sgreen → LpSolit
Attachment #8463107 - Flags: review?(sgreen)

Comment 2

4 years ago
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+

Updated

4 years ago
Flags: approval?
(Assignee)

Comment 3

4 years ago
(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+
(Assignee)

Comment 4

4 years ago
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   98041ff..8770b2c  master -> master
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.