Page MenuHomePhabricator

Remove MySQL aliasing for user_newtalk indexes
Closed, ResolvedPublic

Description

Even though tables.sql names them un_user_id and un_user_ip, they may be named user_id and user_ip in the actual database due to aliasing in MWLBFactory. Or they may not, see T233221 for a similar case.

At least this case is much less complicated, as the indexes were present since the table was created. So there are no update.php patches that might have resulted in both names existing.

After examining queries against user_newtalk, there does not seem to be anything referring to these indexes by name in core or extensions/skins in Gerrit.

Event Timeline

Anomie created this task.Sep 18 2019, 4:43 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 18 2019, 4:43 PM
Anomie added a subscriber: Marostegui.

@Marostegui: This isn't ready for the official Blocked-on-schema-change request yet, but I'm pinging you now in case you want to be aware of it.

Change 537694 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] Remove MySQL index aliasing for user_newtalk indexes

https://gerrit.wikimedia.org/r/537694

Thanks - I might include this alter along with the other ones we are doing for T233135

Change 537694 merged by jenkins-bot:
[mediawiki/core@master] Remove MySQL index aliasing for user_newtalk indexes

https://gerrit.wikimedia.org/r/537694

@Marostegui: The patch for this rename is merged now. Do you want to just add it to the list of changes in T233135, or should I file a separate schema-change task for tracking purposes?

@Marostegui: The patch for this rename is merged now. Do you want to just add it to the list of changes in T233135, or should I file a separate schema-change task for tracking purposes?

Let's create a different one (even if I run all the changes at the same time). Easier to track in the future.
Thank you! :)