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

Match MySQL's handling of nested subroutine definitions. #8053

Open
nicktobey opened this issue Jun 24, 2024 · 0 comments
Open

Match MySQL's handling of nested subroutine definitions. #8053

nicktobey opened this issue Jun 24, 2024 · 0 comments
Labels
correctness We don't return the same result as MySQL enhancement New feature or request

Comments

@nicktobey
Copy link
Contributor

A "subroutine" refers to any statement or block of statements that is defined but may not be immediately executed. MySQL has six types of subroutines:

  • CREATE PROCEDURE
  • CREATE FUNCTION
  • CREATE TRIGGER
  • CREATE EVENT
  • CREATE TABLE AS
  • CREATE VIEW AS

Dolt has all of these except functions.

Nesting these constructs is allowed in some cases but not others. Prior to fixing #8028, attempting to nest these constructs caused a panic. Now, while there is no panic, our behavior does not necessarily match MySQL

  • In cases where both Dolt and MySQL return an error, Dolt's error message should match MySQL.

  • In cases where Dolt returns an error but MySQL doesn't, we should match MySQL's behavior.

  • In cases where MySQL returns an error but Dolt doesn't, we should either match MySQL, or add additional tests to verify that our behavior is sensible.

@timsehn timsehn added enhancement New feature or request correctness We don't return the same result as MySQL labels Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
correctness We don't return the same result as MySQL enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants