Log entries and associated page revisions for some actions (upload, move, protect) are not actually associated in the database in any way (other than the title and timestamp hopefully matching). This is inconvenient.
Huh, I didn't realize we have a log_search table. I was sad that it won't be queryable when stored in log_params :D
Note that at the moment, https://gerrit.wikimedia.org/r/211656 only stores the associated rev_id in the recentchanges table, which is ephemeral (but that will work for page patrolling and some change tags issues). I think I'll write a separate patch for logging.log_params and log_search.