API: Filter lists of IDs before sending them to the database
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 14 Jul 2016 18:55:22 +0000 (14:55 -0400)
committerReedy <reedy@wikimedia.org>
Tue, 4 Dec 2018 08:57:57 +0000 (08:57 +0000)
commite1b2dd4720b88f987bed3a23a1b5ebb2ecc74407
treed60ad398f63cf5cda25c4e5f06cff601235981e0
parenteb758b5fb152e1bee67239112649f43525a6fef2
API: Filter lists of IDs before sending them to the database

People apparently have a tendency to typo the IDs somehow, and if you
hand MySQL a stringified integer in a list that is out of range it
decides it can't use sensible indexes.

Bug: T140302
Change-Id: Ic1975220e55cb9daa16127ec0540e7ad16aad44e
includes/api/ApiBase.php
includes/api/ApiPageSet.php
includes/api/ApiQueryBase.php
includes/api/ApiQueryBlocks.php