Page MenuHomePhabricator

MySQL "ERROR 1356" when querying page table of 29 wikis
Closed, ResolvedPublic

Description

I am running an SQL query involving the page table on all WMF wikis. For some reason, any query involving this table fails for me on 29 wikis with an error message such as this one:

ERROR 1356 (HY000): View 'altwiki_p.page' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

The query can be as simple as SELECT * FROM page LIMIT 10;, or more complex. Doesn't matter.

Affected wikis:

  1. altwiki
  2. amiwiki
  3. avkwiki
  4. banwikisource
  5. bclwiktionary
  6. dagwiki
  7. diqwiktionary
  8. enwikivoyage
  9. eowikivoyage
  10. jawikivoyage
  11. jvwikisource
  12. lldwiki
  13. lmowiktionary
  14. madwiki
  15. mgwiktionary
  16. mniwiki
  17. mniwiktionary
  18. mnwwiktionary
  19. niawiki
  20. niawiktionary
  21. pwnwiki
  22. shiwiki
  23. skrwiki
  24. skrwiktionary
  25. smnwiki
  26. taywiki
  27. trvwiki
  28. trwikivoyage
  29. wawikisource

All other wikis seem to be fine. I suspect that there is something wrong with the database configuration of the wikis listed above.

I observe the same behavior when querying from within my PAWS account, or from the Toolforge console using my standard msyn account.

Event Timeline

Compare

CREATE ALGORITHM=UNDEFINED DEFINER=viewmaster@% SQL SECURITY DEFINER VIEW page AS select altwiki.page.page_id AS page_id,altwiki.page.page_namespace AS page_namespace,altwiki.page.page_title AS page_title,altwiki.page.page_restrictions AS page_restrictions,altwiki.page.page_is_redirect AS page_is_redirect,altwiki.page.page_is_new AS page_is_new,altwiki.page.page_random AS page_random,altwiki.page.page_touched AS page_touched,altwiki.page.page_links_updated AS page_links_updated,altwiki.page.page_latest AS page_latest,altwiki.page.page_len AS page_len,altwiki.page.page_content_model AS page_content_model,altwiki.page.page_lang AS page_lang from altwiki.page

and

CREATE ALGORITHM=UNDEFINED DEFINER=viewmaster@% SQL SECURITY DEFINER VIEW page AS select enwiki.page.page_id AS page_id,enwiki.page.page_namespace AS page_namespace,enwiki.page.page_title AS page_title,enwiki.page.page_is_redirect AS page_is_redirect,enwiki.page.page_is_new AS page_is_new,enwiki.page.page_random AS page_random,enwiki.page.page_touched AS page_touched,enwiki.page.page_links_updated AS page_links_updated,enwiki.page.page_latest AS page_latest,enwiki.page.page_len AS page_len,enwiki.page.page_content_model AS page_content_model,enwiki.page.page_lang AS page_lang from enwiki.page

Looks like at least altwiki still has page_restrictions. I guess this needs maintain-views running

I am running an SQL query involving the page table on all WMF wikis.

Where exactly and how? Is this PAWS or Quarry related, maybe?

Marostegui claimed this task.
Marostegui subscribed.

maintain-views wasn't run on clouddb1020:3315 (it was on 1016 and 1021), so I guess cloud-services-team missed that one. I have run it myself and those wikis are now available on the three hosts.

I am running an SQL query involving the page table on all WMF wikis.

Where exactly and how? Is this PAWS or Quarry related, maybe?

The view has not been updated fully. @Marostegui is looking.

Looks to be working now, thanks for the very quick fix @Marostegui