Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2016-02-04 12:41:10 -0500
committerEike Stepper2016-02-04 12:41:10 -0500
commit6a0023439cdb51ab06c07507f1f26f4bd6906f18 (patch)
tree256b16c4e041250602ce148285469337ed6809a9
parentf11f14a3b2711978ad96d835dd69b2384721bb37 (diff)
downloadcdo-committers/estepper/commit-after-ddl.tar.gz
cdo-committers/estepper/commit-after-ddl.tar.xz
cdo-committers/estepper/commit-after-ddl.zip
[482886] A more aggressive fix that involves an extra commitcommitters/estepper/commit-after-ddl
https://bugs.eclipse.org/bugs/show_bug.cgi?id=482886
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java3
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
index 90514b8911..62b19a9641 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
@@ -896,6 +896,13 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
IMappingStrategy mappingStrategy = store.getMappingStrategy();
mappingStrategy.createMapping(connection, packageUnits, monitor.fork());
+
+ int writePackageUnits; // TODO Extra commit needed for Mysql between DDL and DML.
+ connection.commit();
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
}
finally
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java
index 1cdbe40908..bbfd573f00 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java
@@ -77,8 +77,9 @@ public abstract class StoreAccessor extends StoreAccessorBase
{
monitor.begin(1 + newPackageUnits.length + 2 + newObjects.length + detachedObjects.length + dirtyCount + 1);
- writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, commitComment, monitor.fork());
+ int writePackageUnits; // TODO writePackageUnits() first.
writePackageUnits(newPackageUnits, monitor.fork(newPackageUnits.length));
+ writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, commitComment, monitor.fork());
IDGenerationLocation idGenerationLocation = store.getRepository().getIDGenerationLocation();
if (idGenerationLocation == IDGenerationLocation.STORE)

Back to the top