-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
implicit commit on ddl statements #2818
Conversation
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.
LGTM, see notes
@@ -232,6 +232,7 @@ func (b *Builder) buildSubquery(inScope *scope, stmt ast.Statement, subQuery str | |||
case *ast.Show: | |||
return b.buildShow(inScope, n) | |||
case *ast.DDL: | |||
b.qFlags.Set(sql.QFlagDDL) |
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.
This is a good start but incomplete. There are other DDL operations that aren't captured by this node, notably ALTER TABLE
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.
Should add more tests for other statement types
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.
Included QFlagAlterTable
and added tests for create index
, create database
, create procedure
, create event
, alter table
Certain queries ignore autocommit, and will implicitly commit the transaction.