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

Fix underspecified insert tests #961

Merged
merged 6 commits into from
Apr 21, 2022
Merged

Fix underspecified insert tests #961

merged 6 commits into from
Apr 21, 2022

Conversation

max-hoffman
Copy link
Contributor

@max-hoffman max-hoffman commented Apr 20, 2022

No inserts were not being run with prepareds. A lot of them were broken, but should be running in GMS now at least.

Edit: These pass Dolt also.

Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

A little mysterious, could use some explanatory comments

enginetest/enginetests.go Show resolved Hide resolved
sql/analyzer/analyzer.go Outdated Show resolved Hide resolved
return n, transform.SameTree, nil
}

if _, ok := ins.Source.(*plan.TriggerExecutor); ok {
Copy link
Member

Choose a reason for hiding this comment

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

So we don't do this if there's a pre-insert trigger? Why? Leave a comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll copy the comment from above

sql/dual.go Outdated Show resolved Hide resolved
if _, ok := parsed.(sql.Databaser); ok {
_, isInsert := parsed.(*plan.InsertInto)
_, isDatabaser := parsed.(sql.Databaser)
if bl, ok := parsed.(*plan.Block); ok {
Copy link
Member

Choose a reason for hiding this comment

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

When is an insert ever inside a block node? What's going on here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this one also confuses me, daylon added Block last week for foreign keys

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks like *sqlparser.MultiAlterDDL is now a thing, Block wraps arbitrarily nested statements?

@max-hoffman max-hoffman merged commit d76a3cc into main Apr 21, 2022
@max-hoffman max-hoffman deleted the max/prep-stmt-bugs branch April 21, 2022 17:55
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.

2 participants