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

MariaDB into existing MySQL, or new dialect for CREATE/DROP [OR REPLACE] ? #5840

Open
3 tasks done
Xemptuous opened this issue May 2, 2024 · 3 comments · May be fixed by #5856
Open
3 tasks done

MariaDB into existing MySQL, or new dialect for CREATE/DROP [OR REPLACE] ? #5840

Xemptuous opened this issue May 2, 2024 · 3 comments · May be fixed by #5856
Labels
enhancement New feature or request mysql new dialect For issues relating to currently unsupported dialects

Comments

@Xemptuous
Copy link

Search before asking

  • I searched the issues and found no similar issues.

Description

MariaDB has some small syntactic differences compared to MySQL, but for the most part should be very similar. I have run into issues where the linter throws unparsable section errors because of the presence of CREATE OR REPLACE TABLE statements, because MySQL doesn't support the OR REPLACE syntax.

There are many more instances where parsing errors happen due to small differences between these dialects.

Would it be preferrable to add to the existing MySQL syntax, or to create a whole new dialect specifically for the small MariaDB changes?i

Use case

mariadb dialect added that borrows heavily from mysql but with syntax differences accounted for.

Dialect

MySQL

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct

@Xemptuous Xemptuous added the enhancement New feature or request label May 2, 2024
@github-actions github-actions bot added the mysql label May 2, 2024
@WittierDinosaur
Copy link
Contributor

I think a new dialect, based off of MySQL is the way to go here. Do you fancy drafting the initial implementation?

@Xemptuous
Copy link
Author

I think a new dialect, based off of MySQL is the way to go here. Do you fancy drafting the initial implementation?

Yes, I can try and draft a PR linking to this. It might take me a bit to understand how to get it done, but I can get working on a branch soon.

@WittierDinosaur
Copy link
Contributor

Great! For pointers on how to do it: #5640 added Vertica, and #5741 added a couple of bits that the first PR missed

@WittierDinosaur WittierDinosaur added the new dialect For issues relating to currently unsupported dialects label May 6, 2024
@Xemptuous Xemptuous linked a pull request May 7, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mysql new dialect For issues relating to currently unsupported dialects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants