I really dislike this code, but since we're using a global MySQL client object and have that funky `useTestDatabase()` function that modifies the DB it's using, I needed a way to reflect its current state in the code.