3.13. MySQL

3.13.1. Known issues with MySQL

Example 3.13. Example properties for MySQL

kodo.ConnectionDriverName: com.mysql.jdbc.Driver
kodo.ConnectionURL: jdbc:mysql://SERVER_NAME/DB_NAME

3.13.1. Known issues with MySQL

  • The default table types that MySQL uses do not support transactions, which will prevent Kodo from being able to roll back transactions. Use the InnoDB table type for any tables that Kodo will access.

  • MySQL does not support sub-selects in versions prior to 4.1, and are disabled by default. Some operations (such as the isEmpty() method in a JDOQL query) will fail due to this. If you are using MySQL 4.1 or later, you can lift this restriction by setting the SupportsSubselect=true parameter of the kodo.jdbc.DBDictionary property.

  • Rollback due to database error or optimistic lock violation is not supported unless the table type is one of the MySQL transactional types. Explicit calls to rollback() before a transaction has been committed, however, are always supported.

  • Floats and doubles may lose precision when stored in some datastores.

  • When storing a field of type java.math.BigDecimal, some datastores will add extraneous trailing 0 characters, causing an equality mismatch between the field that is stored and the field that is retrieved.

  • Some version of the MySQL JDBC driver have a bug that prevents Kodo from being able to interrogate the database for foreign keys. Version 3.0.14 (or higher) of the MySQL driver is required in order to get around this bug.


Skip navigation bar   Back to Top