-
Notifications
You must be signed in to change notification settings - Fork 101
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
skeema 1.7.1 + MySQL 8.0 Diff verification failure #184
Comments
Thank you Terry (and Keith) for the excellent issue report! I can confirm this is a bug: some refactored code in Skeema 1.7.1 appears to have caused an unintentional regression. The issue only affects MySQL 8, and only if the table's default charset has a different associated default collation than the table's default collation. In other words, this won't come up on tables using Unfortunately that means users who upgraded from MySQL 5.7 (or earlier) to 8.0 are more likely to be affected, since the default collation for utf8mb4 changed to Context on the refactored code and this bug: Skeema uses the output of
MySQL versions before MySQL 8, and all versions of MariaDB, had consistent logic around when columns would include
In MySQL 8, if your table-level defaults are (for example)
In other words: In MySQL 8, you can take a "canonical" CREATE TABLE (exactly as returned by This should be fixable by reintroducing some of the hacky normalization logic from pre-1.7.1, but hopefully there's a better way. In any case, will aim to have a fix in Skeema 1.8.0, due out in a couple weeks. |
Thank you for creating such excellent software! ❤️ |
Update: a fix will be committed soon 🥳 It will be included in Skeema v1.8.0, which is currently planned for release tomorrow, assuming no unexpected problems come up when running the full matrix of integration tests. The fix changes the Initially I was wary of re-using the table diff logic in this way, to essentially verify itself, but in retrospect it has enough safeguards built-in for this approach to be viable. For example, if the |
Skeema v1.8.0 has been released and contains this fix. Thanks again for the comprehensive issue report! |
Describe the bug
When creating a new table with varchar/text columns or adding varchar/text columns to an existing table we're experiencing skeema verification failures if we do not explicitly specify COLLATION on each column.
Environment
To Reproduce
Expected behavior
On skeema 1.7.1 + MySQL 5.7 this doesn't appear to be an issue. In testing skeema 1.7.0 + MySQL 8.0 this doesn't appear to be an issue.
Additional context
Our work arounds so far have been either adding COLLATION for schema changes OR running a skeema pull after the fact to get the .sql files back into canonical format.
The text was updated successfully, but these errors were encountered: