Skip to content
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

Merged
merged 11 commits into from
Sep 16, 2015
Merged

Set ServerStatusInTrans flag #159

merged 11 commits into from
Sep 16, 2015

Conversation

zimulala
Copy link
Contributor

No description provided.

@coocood
Copy link
Member

coocood commented Sep 15, 2015

LGTM

// SetStatusInTrans sets the status flags about ServerStatusInTrans.
func (s *SessionVars) SetStatusInTrans(isInTrans bool) {
if isInTrans {
s.Status = s.Status | mysql.ServerStatusInTrans
Copy link
Member

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) {
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep.

@coocood
Copy link
Member

coocood commented Sep 15, 2015

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.

@zimulala
Copy link
Contributor Author

got it, my fault.

@coocood
Copy link
Member

coocood commented Sep 16, 2015

LGTM

1 similar comment
@ngaut
Copy link
Member

ngaut commented Sep 16, 2015

LGTM

ngaut added a commit that referenced this pull request Sep 16, 2015
@ngaut ngaut merged commit 46a1fbb into master Sep 16, 2015
@ngaut ngaut deleted the zimuxia/status-in-trans branch September 16, 2015 11:48
YuJuncen pushed a commit to YuJuncen/tidb that referenced this pull request Apr 23, 2021
…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
xhebox pushed a commit to xhebox/tidb that referenced this pull request Sep 28, 2021
xhebox pushed a commit to xhebox/tidb that referenced this pull request Oct 8, 2021
ti-chi-bot pushed a commit that referenced this pull request Oct 9, 2021
nolouch pushed a commit to tidblabs/tidb that referenced this pull request Jan 6, 2023
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants