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 migration succeeds despite syntax error in .sql file #343

Open
zackangelo opened this issue Jul 10, 2024 · 3 comments
Open

MySQL migration succeeds despite syntax error in .sql file #343

zackangelo opened this issue Jul 10, 2024 · 3 comments

Comments

@zackangelo
Copy link

When running an initial migration to execute a series of CREATE TABLE statements for MySQL, I noticed that I was missing a semicolon. The migration reported as a success even though the .sql migration file had a syntax error. It just created a couple of the tables in the file and ignored the rest.

When I pipe the .sql file directly into mysql it reports the syntax error as expected. Is this intended behavior? Am I organizing my migration files wrong?

@zackangelo
Copy link
Author

Upon some further inspection, it seems this is only a problem with the mysql driver. It reports the syntax error correctly and fails the migration when I use mysql_async.

@failable
Copy link

Same issue when mysql and CREATE TABLE.

@jxs
Copy link
Member

jxs commented Aug 2, 2024

Hi, and thanks for the interest! Interesting, does the sql query also succeed if you run it directly with mysql ?

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

No branches or pull requests

3 participants