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

Support MySQL 5.X as a target #988

Open
bobvawter opened this issue Sep 3, 2024 · 5 comments
Open

Support MySQL 5.X as a target #988

bobvawter opened this issue Sep 3, 2024 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@bobvawter
Copy link
Member

These older versions of MySQL don't support CTE's, which, at a minimum, prevents the schema-inspection queries from running. There may be other unknown-unknown's in terms of SQL workload changes.

@bobvawter bobvawter added enhancement New feature or request good first issue Good for newcomers labels Sep 3, 2024
@ryanluu12345
Copy link
Contributor

My understanding here is that we need to just add a new set of queries that don't use CTEs for MySQL and then drill in the version of the database throughout the codebase so that we can know when to use the MySQL 5.7 queries

@bobvawter
Copy link
Member Author

Adding support in schemawatch is the first identified task.

Run TEST_TARGET_CONNECT=mysql://root:SoupOrSecret@localhost:3306/ go test ./... to validate.

@bobvawter
Copy link
Member Author

Possibly an opportunity for #996

@ryanluu12345
Copy link
Contributor

Yep, I see what you mean by adding support in schemwatch. I see the query templates inside of internal/target/schemawatch/dependencies.go. Based on my read, it looks like we'll just need to add a new mysql5_7 template and then update the MySQL case statement so that if we see version 5.7, we use the new query without CTEs.

@ryanluu12345
Copy link
Contributor

Regarding #996, I can take a look at that once I get this base functionality working. Then can refactor this so it applies to all templates for every dialect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants