Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-03-06 07:50:54 +0000
committerEike Stepper2013-03-07 13:44:28 +0000
commit16aa130826e48bc33f5dbd7888f75face530e90d (patch)
tree3622a3d46bbde50557b7430641104e08f1fb51f6 /plugins/org.eclipse.net4j.db.mysql
parent81a23a1e6238318f5fc18c97c0ef64b3ed51b3df (diff)
downloadcdo-16aa130826e48bc33f5dbd7888f75face530e90d.tar.gz
cdo-16aa130826e48bc33f5dbd7888f75face530e90d.tar.xz
cdo-16aa130826e48bc33f5dbd7888f75face530e90d.zip
[401763] Make CDO Server more robust against data dictionary changes
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401763
Diffstat (limited to 'plugins/org.eclipse.net4j.db.mysql')
-rw-r--r--plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java b/plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java
index 670d37af34..afb275b38f 100644
--- a/plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java
+++ b/plugins/org.eclipse.net4j.db.mysql/src/org/eclipse/net4j/db/mysql/MYSQLAdapter.java
@@ -13,6 +13,7 @@ package org.eclipse.net4j.db.mysql;
import org.eclipse.net4j.db.DBType;
import org.eclipse.net4j.db.IDBAdapter;
import org.eclipse.net4j.db.ddl.IDBField;
+import org.eclipse.net4j.db.ddl.IDBIndex;
import org.eclipse.net4j.spi.db.DBAdapter;
import java.sql.SQLException;
@@ -103,6 +104,14 @@ public class MYSQLAdapter extends DBAdapter
}
@Override
+ protected void dropPrimaryKey(IDBIndex index, StringBuilder builder)
+ {
+ builder.append("ALTER TABLE "); //$NON-NLS-1$
+ builder.append(index.getTable());
+ builder.append(" DROP PRIMARY KEY"); //$NON-NLS-1$
+ }
+
+ @Override
protected void addIndexField(StringBuilder builder, IDBField field)
{
super.addIndexField(builder, field);

Back to the top