-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Set ServerStatusInTrans flag #159
Conversation
LGTM |
// SetStatusInTrans sets the status flags about ServerStatusInTrans. | ||
func (s *SessionVars) SetStatusInTrans(isInTrans bool) { | ||
if isInTrans { | ||
s.Status = s.Status | mysql.ServerStatusInTrans |
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.
Using s.Status |= xxx
?
@@ -513,6 +513,45 @@ func (s *testSessionSuite) TestAutoicommit(c *C) { | |||
mustExecSQL(c, se, s.dropDBSQL) | |||
} | |||
|
|||
func checkInTrans(c *C, se Session, stmt string, isNil bool, expect uint16) { |
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.
Seems no need to use expect or isNil variable? Use one of them is enough?
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.
yep.
When we begined a transaction, then executed an DDL statement, that transaction is force commited, so the server status in transaction should be set to false. |
got it, my fault. |
LGTM |
1 similar comment
LGTM |
…gcap#158 (pingcap#159) * tests: fix a test failure due to conflict between pingcap#145 and pingcap#158 * restore: apply the row count limit to failpoint KillIfImportedChunk too
* release 6.4 support tiflash multi-tenant Signed-off-by: iosmanthus <myosmanthustree@gmail.com> * fix make check Signed-off-by: iosmanthus <myosmanthustree@gmail.com> Signed-off-by: iosmanthus <myosmanthustree@gmail.com> Co-authored-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
No description provided.