mirror of https://github.com/apache/activemq.git
Fix for MySQL DB tables should be INNODB based for proper tx support: https://issues.apache.org/activemq/browse/AMQ-1891
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@686264 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
15fb25d653
commit
479f5e1713
|
@ -27,6 +27,15 @@ public class MySqlJDBCAdapter extends DefaultJDBCAdapter {
|
||||||
public void setStatements(Statements statements) {
|
public void setStatements(Statements statements) {
|
||||||
statements.setLockCreateStatement("LOCK TABLE " + statements.getFullLockTableName() + " WRITE");
|
statements.setLockCreateStatement("LOCK TABLE " + statements.getFullLockTableName() + " WRITE");
|
||||||
statements.setBinaryDataType("LONGBLOB");
|
statements.setBinaryDataType("LONGBLOB");
|
||||||
|
|
||||||
|
// Use INNODB table since we need transaction support.
|
||||||
|
String[] s = statements.getCreateSchemaStatements();
|
||||||
|
for (int i = 0; i < s.length; i++) {
|
||||||
|
if( s[i].startsWith("CREATE TABLE")) {
|
||||||
|
s[i] = s[i]+" TYPE=INNODB";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
super.setStatements(statements);
|
super.setStatements(statements);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue