Fix most of PersistenceQueryTest.
Granting / revocation of administrative privileges.