Usernames of block users are stored in ipblocks.ipb_address. This field generally uses spaces in place of underscores. However many entries are inexplicably using underscores. This is screwing up the API.
Example:
https://en.wikipedia.org/w/api.php?action=query&list=blocks&bkusers=Mistress+Selina+Kyle
No results are currently found.
From the Toolserver's enwiki_p, however:
mysql> select * from ipblocks where ipb_address ='Mistress_Selina_Kyle' limit 1\G
- 1. row ******* ipb_id: 175820 ipb_address: Mistress_Selina_Kyle ipb_user: 697854 ipb_by: 129409 ipb_reason: restoring block as this was not discussed; this user has been extremely disruptive and was never a useful contributor ipb_timestamp: 20060528233006 ipb_auto: 0 ipb_anon_only: 0 ipb_create_account: 1 ipb_expiry: infinity ipb_range_start: ipb_range_end:
ipb_enable_autoblock: 1
ipb_deleted: 0 ipb_block_email: 0 ipb_by_text: SlimVirgin ipb_allow_usertalk: 1
1 row in set (0.10 sec)
Similarly, https://en.wikipedia.org/w/api.php?action=query&list=blocks&bkusers=MilkMan_Chocolate only references one block entry. The database actually has two:
mysql> select * from ipblocks where ipb_address ='MilkMan_Chocolate' limit 1\G***** 1. row *****
ipb_id: 36301 ipb_address: MilkMan_Chocolate ipb_user: 416818 ipb_by: 61329 ipb_reason: Vandal ipb_timestamp: 20050904050301 ipb_auto: 0 ipb_anon_only: 0 ipb_create_account: 1 ipb_expiry: infinity ipb_range_start: ipb_range_end:
ipb_enable_autoblock: 1
ipb_deleted: 0 ipb_block_email: 0 ipb_by_text: Rdsmith4 ipb_allow_usertalk: 1
1 row in set (0.01 sec)
mysql> select * from ipblocks where ipb_address ='MilkMan Chocolate' limit 1\G
- 1. row ******* ipb_id: 36680 ipb_address: MilkMan Chocolate ipb_user: 416818 ipb_by: 58666 ipb_reason: sockpuppet, evading block ipb_timestamp: 20050906061037 ipb_auto: 0 ipb_anon_only: 0 ipb_create_account: 1 ipb_expiry: infinity ipb_range_start: ipb_range_end:
ipb_enable_autoblock: 1
ipb_deleted: 0 ipb_block_email: 0 ipb_by_text: MarkSweep ipb_allow_usertalk: 1
1 row in set (0.01 sec)
Version: unspecified
Severity: normal