Page MenuHomePhabricator

Replica templatelinks table is broken for some sites
Closed, ResolvedPublicBUG REPORT

Description

The replica templatelinks tables for some sites are broken for not accessible.

For dewiki, the table only has 3 columns when it should have 5 (it's missing tl_title and tl_namespace).

MariaDB [dewiki_p]> SELECT * FROM templatelinks LIMIT 5;
+---------+-------------------+--------------+
| tl_from | tl_from_namespace | tl_target_id |
+---------+-------------------+--------------+
|    5057 |                 0 |            1 |
|   10354 |                 0 |            1 |
|   10561 |                 0 |            1 |
|   11891 |                 0 |            1 |
|   14183 |                 0 |            1 |
+---------+-------------------+--------------+

For frwiki, it is not accessible.

MariaDB [frwiki_p]> SELECT * FROM templatelinks LIMIT 5;
ERROR 1356 (HY000): View 'frwiki_p.templatelinks' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

But for enwiki, it works as expected

MariaDB [enwiki_p]> SELECT * FROM templatelinks LIMIT 5;
+---------+--------------+----------+-------------------+--------------+
| tl_from | tl_namespace | tl_title | tl_from_namespace | tl_target_id |
+---------+--------------+----------+-------------------+--------------+
|     340 |           10 | IPA-fr   |                 0 |            1 |
|     953 |           10 | IPA-fr   |                 0 |            1 |
|     981 |           10 | IPA-fr   |                 0 |            1 |
|     983 |           10 | IPA-fr   |                 0 |            1 |
|    1049 |           10 | IPA-fr   |                 0 |            1 |
+---------+--------------+----------+-------------------+--------------+

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This is due to the work for T299417: Normalize templatelinks table.

For dewiki, the table only has 3 columns when it should have 5 (it's missing tl_title and tl_namespace).

No, the current state is correct, since dewiki has been migrated to the new schema.

This is due to the work for T299417: Normalize templatelinks table.

For dewiki, the table only has 3 columns when it should have 5 (it's missing tl_title and tl_namespace).

No, the current state is correct, since dewiki has been migrated to the new schema.

Oh ok I see, I guess https://www.mediawiki.org/wiki/Manual:Templatelinks_table hasn't been updated fully yet.

I'll run maintain views on wikis it's broken.

The view is broken and that's why you got

 SELECT * FROM templatelinks LIMIT 5;
ERROR 1356 (HY000): View 'frwiki_p.templatelinks' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Marostegui claimed this task.

Should be fixed now