-
Notifications
You must be signed in to change notification settings - Fork 66
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
Invalid MySQL schema generated when used with Connector/J 8.0.30 #446
Comments
The only thing different is the JDBC driver, so the JDBC driver has changed its support for some JDBC/SQL type. Using schematool "dbinfo" would tell you where the problem is. |
You're right, the default for the
And it looks like datanucleus-rdbms/src/main/java/org/datanucleus/store/rdbms/adapter/MySQLTypeInfo.java Lines 71 to 84 in 5dae971
I raised a PR in #447 and verified that it fixes the issue. |
Bug Report
DataNucleus RDBMS 6.0.1 generates an invalid schema for MySQL, when Connector/J 8.0.30 is used.
With 8.0.29, DataNucleus generates the following:
With 8.0.30, the type of
"NAME"
changes toTINYTEXT(255)
:The
TINYTEXT
type does not accept a length argument, causing the generated schema to be invalid.I didn't spot anything obvious in the Connector/J changelogs that could explain this behavior.
Test Case
I've put together a test setup to reproduce this here: https://github.com/nscuro/datanucleus-test-jdo/tree/rdbms-issue-446
start-database.sh
launches a MySQL 5.7 database with Dockergenerate-schema.sh
uses the DN SchemaTool to generate the complete schema and write it toschema.sql
The text was updated successfully, but these errors were encountered: