Page MenuHomePhabricator

en:wikipedia SQL interwiki table
Closed, ResolvedPublic

Description

Author: bburette

Description:
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:

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:

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 ;
+-----------+---------------+------+-----+---------+-------+

FieldTypeNullKeyDefaultExtra

+-----------+---------------+------+-----+---------+-------+

iw_prefixvarbinary(32)NOPRINULL
iw_urlblobNONULL
iw_localtinyint(1)NONULL
iw_urltinyint(1)NONULL

+-----------+---------------+------+-----+---------+-------+
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,


Version: unspecified
Severity: major

Details

Reference
bz22242

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:54 PM
bzimport set Reference to bz22242.
bzimport added a subscriber: Unknown Object (MLST).

WMF sites use an interwiki cache (using DBA handlers), not the interwiki table.

Bryan.TongMinh wrote:

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