For some reason we have indexes for `image` on `(img_user_text,img_timestamp)` and
`(img_user,img_timestamp)`, but for `oldimage` we only have
`(oi_user_text,oi_timestamp)`. Thus, when building the query in
ImageListPager, we have to be sure to avoid trying to use `oi_user`
rather than `oi_user_text` in the WHERE part.
Bug: T211774
Change-Id: Ibea058031f1cb3421e92e09f0a705ea00fb22008
$actorWhere = ActorMigration::newMigration()->getWhere(
$dbr,
$prefix . '_user',
- User::newFromName( $this->mUserName, false )
+ User::newFromName( $this->mUserName, false ),
+ // oldimage doesn't have an index on oi_user, while image does. Set $useId accordingly.
+ $prefix === 'img'
);
$conds[] = $actorWhere['conds'];
}