Last modified: 2010-01-23 15:43:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T24242, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22242 - en:wikipedia SQL interwiki table
en:wikipedia SQL interwiki table
Status: RESOLVED DUPLICATE of bug 21818
Product: Wikimedia
Classification: Unclassified
Interwiki links (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-23 15:37 UTC by Bernard Burette
Modified: 2010-01-23 15:43 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bernard Burette 2010-01-23 15:37:51 UTC
Hi,

I recently noticed that the API for Wikipedia adds [[U+FFFD]] (they eventually show up like question marks in a little diamond) at the end of all strings returned by the following API request:
* http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap

My bot bumped on this on <i>en.wikipedia.org</i> and was unable to get the interwiki list from the site.

Strangely enough this seems to happen only here as other Wikipedia wikis don't exhibit this behaviour. A few examples:
* http://fr.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap
* http://pt.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap
* http://zh.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap

My guess is that the database table “interwiki” contains extra characters after each field, on my MediaWiki server this is what I see:
 mysql> desc interwiki ;
 +-----------+---------------+------+-----+---------+-------+
 | Field     | Type          | Null | Key | Default | Extra |
 +-----------+---------------+------+-----+---------+-------+
 | iw_prefix | varbinary(32) | NO   | PRI | NULL    |       |
 | iw_url    | blob          | NO   |     | NULL    |       |
 | iw_local  | tinyint(1)    | NO   |     | NULL    |       |
 | iw_url    | tinyint(1)    | NO   |     | NULL    |       |
 +-----------+---------------+------+-----+---------+-------+
you can confirm that all “prefix” fields in the XML returned by <i>en.wikipedia.org</i> are exactly 32 characters long so the var in varbinary() is not used or the code reading that field has a problem.

Thank, Regards,
Comment 1 Chad H. 2010-01-23 15:40:21 UTC
WMF sites use an interwiki cache (using DBA handlers), not the interwiki table.
Comment 2 Bryan Tong Minh 2010-01-23 15:43:51 UTC

*** This bug has been marked as a duplicate of bug 21818 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links