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

[MySQL] Generated invalid PLPGSQL using LOOP label syntax #1364

Open
ssherwood opened this issue Mar 14, 2024 · 0 comments
Open

[MySQL] Generated invalid PLPGSQL using LOOP label syntax #1364

ssherwood opened this issue Mar 14, 2024 · 0 comments
Labels
triage Needs to be triaged

Comments

@ssherwood
Copy link

Running Voyager to migrate a set of stored procedures from MySQL (MariaDB 10.5) and identified a syntax issue using loop labels:

Original:

...
push_foo:LOOP
  If (int_id > intCount) then
     Set var_Comma = "";
     LEAVE push_foo;
  END IF;
  ...
END LOOP push_foo;
...

Result:

...
push_foo:LOOP
  If (int_id > intCount) then
    var_Comma := '';
    EXIT push_foo;
  END IF;
  ...
END LOOP push_foo;
...

The actual syntax in Postgres should have been something more like:

<<push_foo>>
LOOP
  If (int_id > intCount) then
    var_Comma := '';
    EXIT push_foo;
  END IF;
  ...
END LOOP push_foo;
@github-actions github-actions bot added the triage Needs to be triaged label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant