-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Needs TriageThis issue needs to be correctly labelled and triagedThis issue needs to be correctly labelled and triagedType: Bug
Description
Overview of the Issue
Vitess currently does not support SET TRANSACTION ... commands / changes to the respective @@ variables, and instead turns them into session level changes instead.
I think this is pretty dangerous to do, because read-only and isolation level changes that should've been active for only the next transaction, will suddenly be active for the rest of the session lifetime. This can lead to surprising behavior, like suddenly reading dirty data, unexpected row locking / gap locking, and other weirdness.
(Vitess is already emitting a warning if this happens, but I don't think that's enough.)
Vitess should correctly apply these session level settings only to the next transaction that's started, and then revert back to the current session settings.
Reproduction Steps
SELECT @@session.transaction_isolation; # -- 'REPEATABLE-READ'
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT @@session.transaction_isolation; # -- 'READ_UNCOMMITTED'Binary Version
N/AOperating System and Environment details
N/ALog Fragments
N/AReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs TriageThis issue needs to be correctly labelled and triagedThis issue needs to be correctly labelled and triagedType: Bug