| Summary: | [DB] MySQL Error: "Table definition has changed" on initializing new CDO repository | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Simon Kuzin <simon.kuzin> | ||||||||
| Component: | cdo.db | Assignee: | Eike Stepper <stepper> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | Robert.Schulk, simon.kuzin, stepper | ||||||||
| Version: | 4.10 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | Macintosh | ||||||||||
| OS: | Mac OS X | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Simon Kuzin
Proposed patch attached. Created attachment 278451 [details]
Proposed patch
For patch, necessary to run CDO server with MySQL 8 , refer to Bug 546671 : https://bugs.eclipse.org/bugs/show_bug.cgi?id=546671 Moving all unresolved issues to version 4.8- Moving all unresolved issues to version 4.9 *** Bug 560986 has been marked as a duplicate of this bug. *** Also Mysql 5.7 is affected. For me, the proposed patch needs some more changes. I will attach a patch which worked for me with Mysql 5.7. Created attachment 282152 [details]
this patch works for mysql5.7
For bug 561563 I've committed changes that may change this symptom. I'm not sure it addresses the possibly Mysql-specific underlying root cause, but it should at least change the error handling in the rollback case. Is it possible that you try your scenario again with this new code? I've kicked build I20200329-1258... For me: neither mysql 5 or 8 are working. Although: the rollback seems to be successful, so this is good I guess. But the repository cannot be started anyways. The original exception like before is still being thrown. For me, only the proposed patch seems to fix it. (In reply to Robert Schulk from comment #11) > For me: neither mysql 5 or 8 are working. Although: the rollback seems to be > successful, so this is good I guess. Thanks, Robert, for testing it. Making the automatic rollback work was the goal of my commit so far. > But the repository cannot be started anyways. > > The original exception like before is still being thrown. For me, only the > proposed patch seems to fix it. I'll test the patch when I have time to update all my DBMS versions. I vaguely recall that the proposed patch might cause regressions with other DBMS types. Which could mean that we need to refactor the decision about whether to use the same or a separate Connection into the DBAdapter... Hi Robert, Eike, nice to see this issue finally grabbed some attention. For the time passed from the creation of the ticket, I've got CDO server with proposed patch running with Postgres 11 and Oracle 11. I can run some sanity check on these DBMSs if you guide me on tests, we need to execute. So, I've spent the better part of this entire week on modernizing our Mysql support. That includes the following activities: - Upgrade the MYSQLAdapter to version 5.7.28 * Notice the new, smaller list of reserved words (which are actually just the "keywords"). This can lead to problems when using the new adapter with an older db. Manual schema modifications may be required! - Refactor the decision about whether to use the same or a separate Connection into the DBAdapter * that fixes the problem of this bugzilla * and also works with H2 - Introduce two new DBStore-level properties: <property name="externalRefsURIColumnType" value="VARCHAR"/> <property name="externalRefsURIColumnLength" value="1024"/> - Introduce DBAdapter.convertToSQL(Object) * Called from SQLQueryHandler to support customizable parameter value conversion - Introduce IDBField.isIndexed() * Called from MYSQLAdapter.getTypeName(IDBField) to implement smarter VARCHAR conversion - Fixed all (!) test failures in AllTestsDBMysql * Create /org.eclipse.emf.cdo.tests.db/install-db/install-mysql.ant to download, install, initialize, and start a Mysql db. * See comment on MYSQLConfig.java TODOs: - Provide a p2 repo with latest JDBC drivers - Test with Postgres, Oracle, DB2, Derby, Hsqldb - Fix a few timeouts in auditing that are related to testing CDOUnit support, see Bugzilla_486458b_Test.testLongCommitWithParallelCreateUnit() - Cope with MySQL 8.x (In reply to comment #13) > For the time passed from the creation of the ticket, I've got CDO server with > proposed patch running with Postgres 11 and Oracle 11. > > I can run some sanity check on these DBMSs if you guide me on tests, we need to > execute. Simon, that would be absolutely great. We have the following launch configs: CDO AllTests (PostgreSQL ALL) CDO AllTests (Oracle) But I have currently no clue what subtleties are in org.eclipse.emf.cdo.tests.db.PostgresqlConfig and org.eclipse.emf.cdo.tests.db.OracleConfig. If you give it a try and hit problems, let me know... (In reply to comment #14) > - Upgrade the MYSQLAdapter to version 5.7.28 > * Notice the new, smaller list of reserved words (which are actually just the > "keywords"). This can lead to problems when using the new adapter with an older > db. Manual schema modifications may be required! A solution to bug 282789 would help at least for similar cases in the future... The changes are committed: https://git.eclipse.org/c/cdo/cdo.git/commit/?id=cc6e929b042369cb56a2a30436f150b337ddd664 Thanks so much! The last integration build works for me (mysql 5.7). I observed an issue with the method CDODBUtil#createStore: the properties must not be set to null anymore. I am using an empty map, and everything works fine. Closing. Closing. |