Skip to content

Conversation

kblomster
Copy link
Contributor

@kblomster kblomster commented Dec 14, 2021

MySQL 5.7 does not support CTE's. Refactor the table column metadata query to avoid the CTE. Fixes regression introduced in 8864667; see also issue #111.

Some of the MySQL tests are failing on 5.7 but not any of the generator ones, just some SELECT ones that use syntax that MySQL 5.7 doesn't have, so that's only to be expected. As a side note, to import test_sample.sql from the testdata repo into 5.7 with (AFAIK) default settings, I had to add the line SET SQL_MODE='ALLOW_INVALID_DATES'; or it'd complain about an invalid default for the column timestamp_ptr. I'm not sure if I can/should do anything about that, so I left it as is.

MySQL 5.7 does not support CTE's. Refactor the table column metadata
query to avoid the CTE.
@go-jet
Copy link
Owner

go-jet commented Dec 15, 2021

Perfect. Looks good.

@go-jet go-jet merged commit 4d5abc8 into go-jet:develop Dec 15, 2021
@go-jet go-jet linked an issue Dec 15, 2021 that may be closed by this pull request
@kblomster kblomster deleted the generator-mysql-5.7-support branch December 20, 2021 08:57
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

Successfully merging this pull request may close these issues.

Generator no longer supports MySQL 5.7
2 participants