Mysqlbackend: cleanup queries