Page MenuHomePhabricator

testwiki_p.page no longer publicly viewable
Closed, ResolvedPublic

Description

MariaDB [testwiki_p]> DESCRIBE page;
ERROR 1356 (HY000): View 'testwiki_p.page' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

Is this from some sort of maintenance? I have not noticed this error for any other _p database.

Event Timeline

bd808 moved this task from Backlog to Wiki replicas on the Data-Services board.
bd808 added a subscriber: bd808.

The view is there, but it seems like the rights are messed up?

(u3518@testwiki.analytics.db.svc.eqiad.wmflabs) [testwiki_p]> show create view page\G
*************************** 1. row ***************************
                View: page
         Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`viewmaster`@`%` SQL SECURITY DEFINER VIEW `page` AS select `testwiki`.`page`.`page_id` AS `page_id`,`testwiki`.`page`.`page_namespace` AS `page_namespace`,`testwiki`.`page`.`page_title` AS `page_title`,`testwiki`.`page`.`page_restrictions` AS `page_restrictions`,`testwiki`.`page`.`page_is_redirect` AS `page_is_redirect`,`testwiki`.`page`.`page_is_new` AS `page_is_new`,`testwiki`.`page`.`page_random` AS `page_random`,`testwiki`.`page`.`page_touched` AS `page_touched`,`testwiki`.`page`.`page_links_updated` AS `page_links_updated`,`testwiki`.`page`.`page_latest` AS `page_latest`,`testwiki`.`page`.`page_len` AS `page_len`,`testwiki`.`page`.`page_ext_reviewed` AS `page_ext_reviewed`,`testwiki`.`page`.`page_ext_stable` AS `page_ext_stable`,`testwiki`.`page`.`page_ext_quality` AS `page_ext_quality`,`testwiki`.`page`.`page_content_model` AS `page_content_model`,`testwiki`.`page`.`page_lang` AS `page_lang` from `testwiki`.`page`
character_set_client: utf8
collation_connection: utf8_general_ci
1 row in set, 1 warning (0.00 sec)

Hmm, not sure if this is related, but the page_ext_reviewed, page_ext_stable, and page_ext_quality were part of a flagged revs hack, and should no longer be used, but appear to never have been removed?

Marostegui claimed this task.
Marostegui added a subscriber: Marostegui.

This is related to: T260111
Some columns were removed as they are not part of tables.sql.
As this probably affected more wikis than just testwiki I have run:

sudo /usr/local/sbin/maintain-views --all-databases --table page --replace-all

This fixed it:

root@cumin1001:~# for i in labsdb1009 labsdb1010 labsdb1011 labsdb1012; do echo $i; mysql.py -h$i testwiki_p -e "select * from page limit 1";done
labsdb1009
+---------+----------------+---------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
| page_id | page_namespace | page_title          | page_restrictions | page_is_redirect | page_is_new | page_random    | page_touched   | page_links_updated | page_latest | page_len | page_content_model | page_lang |
+---------+----------------+---------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
|       2 |              1 | Main_Page/Archive_3 |                   |                0 |           0 | 0.230137635595 | 20200912154436 | 20200912154856     |      373819 |     2575 | wikitext           | NULL      |
+---------+----------------+---------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
labsdb1010
+---------+----------------+---------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
| page_id | page_namespace | page_title          | page_restrictions | page_is_redirect | page_is_new | page_random    | page_touched   | page_links_updated | page_latest | page_len | page_content_model | page_lang |
+---------+----------------+---------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
|       2 |              1 | Main_Page/Archive_3 |                   |                0 |           0 | 0.230137635595 | 20200912154436 | 20200912154856     |      373819 |     2575 | wikitext           | NULL      |
+---------+----------------+---------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
labsdb1011
+---------+----------------+---------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
| page_id | page_namespace | page_title          | page_restrictions | page_is_redirect | page_is_new | page_random    | page_touched   | page_links_updated | page_latest | page_len | page_content_model | page_lang |
+---------+----------------+---------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
|       2 |              1 | Main_Page/Archive_3 |                   |                0 |           0 | 0.230137635595 | 20200912154436 | 20200912154856     |      373819 |     2575 | wikitext           | NULL      |
+---------+----------------+---------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
labsdb1012
+---------+----------------+---------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
| page_id | page_namespace | page_title          | page_restrictions | page_is_redirect | page_is_new | page_random    | page_touched   | page_links_updated | page_latest | page_len | page_content_model | page_lang |
+---------+----------------+---------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
|       2 |              1 | Main_Page/Archive_3 |                   |                0 |           0 | 0.230137635595 | 20200912154436 | 20200912154856     |      373819 |     2575 | wikitext           | NULL      |
+---------+----------------+---------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+