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

session: set Sleep state for process info #7826

Merged
merged 2 commits into from
Oct 8, 2018

Conversation

coocood
Copy link
Member

@coocood coocood commented Oct 2, 2018

What problem does this PR solve?

Fixes #7825

What is changed and how it works?

Set the process command to Sleep if sql argument is empty

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch
  • Need to be included in the release note

@coocood coocood added the type/bugfix This PR fixes a bug. label Oct 2, 2018
@@ -712,6 +712,9 @@ func (s *session) SetProcessInfo(sql string) {
State: s.Status(),
Info: sql,
}
if sql == "" {
Copy link
Member

Choose a reason for hiding this comment

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

If the query is sent through the binary protocol with prepare-execute method, will the sql be an empty string?

Copy link
Member

Choose a reason for hiding this comment

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

No, SetProcessInfo will use OriginText of the execute statement. It is set in CompileExecutePreparedStmt.

Copy link
Member

Choose a reason for hiding this comment

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

OK

@shenli
Copy link
Member

shenli commented Oct 6, 2018

/run-all-tests

@shenli
Copy link
Member

shenli commented Oct 8, 2018

LGTM

@shenli shenli added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 8, 2018
Copy link
Contributor

@winkyao winkyao left a comment

Choose a reason for hiding this comment

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

LGTM

@shenli shenli added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Oct 8, 2018
@jackysp jackysp merged commit 05666f5 into pingcap:master Oct 8, 2018
@coocood coocood deleted the processlist-command branch October 8, 2018 08:16
coocood added a commit to coocood/tidb that referenced this pull request Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants