Skip to content

Conversation

@jycor
Copy link
Contributor

@jycor jycor commented Jan 28, 2025

This PR refactors a ton of the stored procedure behavior to more closely match MySQL.

Changes:

  • properly error when creating procedures/triggers/events in other stored routines
  • allow create procedure statements that reference symbols (tables, views, procedures, etc) that don't exist (yet).
  • remove unnecessary analysis and building work
  • simplify building plan.Call nodes

Partially addresses: dolthub/dolt#8053

Copy link
Contributor

@max-hoffman max-hoffman left a comment

Choose a reason for hiding this comment

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

The shape of the changes looks good, if all tests pass it seems like a good directional improvement even if it's still missing correctness edge cases.


// limit validation
case *ast.Select:
if s.Limit != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

the limit/offset in analyzer seems like it does a lot, was this for a specific test that regular analyzer loop doesn't catch?

Copy link
Contributor Author

@jycor jycor Feb 7, 2025

Choose a reason for hiding this comment

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

Yep, create procedure needs to check that the limit/offset value is actually a numeric.

@jycor jycor merged commit c631117 into main Feb 7, 2025
8 checks passed
@jycor jycor deleted the james/proc branch February 7, 2025 19:43
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.

3 participants