-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
executor: implement set transaction read only as of transaction #24766
Changes from 7 commits
72498dd
21871cd
7f7643f
8e32482
9395162
900cf31
b0fe8e2
ce2df75
5c4ffda
6c938a7
3c465d0
29b8389
a72892a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -825,6 +825,13 @@ var defaultSysVars = []*SysVar{ | |
}, GetSession: func(s *SessionVars) (string, error) { | ||
return s.TxnScope.GetVarValue(), nil | ||
}}, | ||
{Scope: ScopeSession, Name: TiDBTxnReadTS, Value: "", SetSession: func(s *SessionVars, val string) error { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this sysvar exposed to users? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is ok to exposed it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem is, users may also use this variable to set read ts. |
||
err := setTxnReadTS(s, val) | ||
if err != nil { | ||
return err | ||
} | ||
return nil | ||
Yisaer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}}, | ||
{Scope: ScopeGlobal | ScopeSession, Name: TiDBAllowMPPExecution, Value: On, Type: TypeEnum, PossibleValues: []string{"OFF", "ON", "ENFORCE"}, SetSession: func(s *SessionVars, val string) error { | ||
s.allowMPPExecution = val | ||
return nil | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you set it and return? To walk around
s.ReadOnly
part?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.