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

*: Support connection_id() #718

Merged
merged 1 commit into from
Dec 14, 2015
Merged

*: Support connection_id() #718

merged 1 commit into from
Dec 14, 2015

Conversation

shenli
Copy link
Member

@shenli shenli commented Dec 14, 2015

Fix: #715

@@ -591,6 +592,9 @@ func CreateSession(store kv.Storage) (Session, error) {
variable.BindSessionVars(s)
variable.GetSessionVars(s).SetStatusFlag(mysql.ServerStatusAutocommit, true)

// set connection id
s.SetValue(builtin.ConnectionIDKey, s.sid)
Copy link
Member

Choose a reason for hiding this comment

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

connection id may be in tidb server conn's ID?

Copy link
Member Author

Choose a reason for hiding this comment

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

Returns the connection ID (thread ID) for the connection. Every connection has an ID that is unique among the set of currently connected clients.
SessionID is unique among the clients.

@siddontang
Copy link
Member

LGTM

1 similar comment
@coocood
Copy link
Member

coocood commented Dec 14, 2015

LGTM

coocood added a commit that referenced this pull request Dec 14, 2015
@coocood coocood merged commit 53a175f into master Dec 14, 2015
@coocood coocood deleted the shenli/issue-715 branch December 14, 2015 07:40
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.

None yet

3 participants