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

Give SQL transactions a debug name #2233

Merged
merged 2 commits into from
Aug 25, 2015
Merged

Give SQL transactions a debug name #2233

merged 2 commits into from
Aug 25, 2015

Conversation

tamird
Copy link
Contributor

@tamird tamird commented Aug 24, 2015

Just "sql" for now.

Easier to review commit-by-commit, first one is cleanup.

@petermattis
Copy link
Collaborator

LGTM

Shouldn't be difficult to pass a debug name from the client and/or allow SET TRANSACTION NAME = foo.

@@ -218,8 +219,9 @@ func (s *Server) execStmt(stmt parser.Statement, req driver.Request, planMaker *
// Start a transaction here and not in planMaker to prevent begin
// transaction from being called within an auto-transaction below.
planMaker.txn = client.NewTxn(*s.db)
planMaker.txn.SetDebugName("sql", 0)
Copy link
Member

Choose a reason for hiding this comment

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

Could we set this to the explained plan instead? That'd be a lot more useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What plan? This is getting set at the moment of BEGIN coming in, which doesn't really do any work.

@vivekmenezes
Copy link
Contributor

LGTM

tamird added a commit that referenced this pull request Aug 25, 2015
Give SQL transactions a debug name
@tamird tamird merged commit a3ee537 into cockroachdb:master Aug 25, 2015
@tamird tamird deleted the sql-txn-debug-name branch August 25, 2015 00:58
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