If the transactd doesn't set session variables of THD by users, snapshot (readonly transaction?) of the transactd can use read only transacion explicitly.
InnoDB can optimize (skip useless processes for read-only transaction) for the snapshot.
We have confirmed that a part of current source code is useless because thd->variables.tx_read_only does not change.
I fixed it almost according to your patch.
If the transactd doesn't set session variables of THD by users, snapshot (readonly transaction?) of the transactd can use read only transacion explicitly. InnoDB can optimize (skip useless processes for read-only transaction) for the snapshot.