If the ipblocks table from a prior-version MediaWiki installation contains any duplicate records (ie: two blocks against the same user or address), the upgrade from MW 1.31 (or earlier) to MW 1.35 fails with a fatal error, as it attempts to create a "unique index" on this field without verifying the sanity of the existing data in the table.
Steps to Reproduce:
On an existing MW 1.31 installation which contains duplicate entries in the ipblocks table (such as two blocks against the same user, or against the same address), any attempt to run maintenance/update.php to "upgrade" to the current MW version (1.35) fails with a fatal error.
The update script attempts to place a "unique index" on the ipblocks.ipb_address field. This operation fails if the existing data in the table contains duplicate records.
No idea how the dupes originally got in there, but this is an existing install which has been live since MW 1.6 (in 2006) and none of the earlier versions seemed to care.
Actual Results:
It's impossible to complete the "upgrade" to MW 1.35 without manually going into the ipblocks table, finding the duplicates with something like:
SELECT DISTINCT CONCAT(ipb_address,''), SUM(1) as count from ipblocks group by ipb_address having count > 1 order by count desc, ipb_address limit 50
and then manually, individually deleting each of them.
Expected Results:
The script needs to detect the duplicates, then either get rid of them (perhaps by copying everything to another table with GROUP BY or INSERT IGNORE) or not attempt to apply the unique index to an existing table which doesn't comply with the prerequisite that the ipb_address actually be unique.