Retention toilets have to be drained. Certainly on road coaches drain cocks can be left open by unscrupulous operators thereby saving on draining costs and creating a similar effect to direct discharge. Don't ask me how I know as I will have to shoot one of us, and I'm nearer.
Our retention tanks are emptied by suction, not a valve on the bottom of the tank.
Mark 4s tend to overflow when full so if you are on a platform and see one approaching with a mist emanating from the underside of the carriages its best to turn your back.
Another thing to remember is at speed the waste will hit the track and atomise, it will then head off in all directions coating everything it contacts including the door handles, handrails etc.