activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r686264 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/MySqlJDBCAdapter.java
Date Fri, 15 Aug 2008 15:54:58 GMT
Author: chirino
Date: Fri Aug 15 08:54:57 2008
New Revision: 686264

URL: http://svn.apache.org/viewvc?rev=686264&view=rev
Log:
Fix for MySQL DB tables should be INNODB based for proper tx support: https://issues.apache.org/activemq/browse/AMQ-1891

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/MySqlJDBCAdapter.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/MySqlJDBCAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/MySqlJDBCAdapter.java?rev=686264&r1=686263&r2=686264&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/MySqlJDBCAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/MySqlJDBCAdapter.java
Fri Aug 15 08:54:57 2008
@@ -27,6 +27,15 @@
     public void setStatements(Statements statements) {
         statements.setLockCreateStatement("LOCK TABLE " + statements.getFullLockTableName()
+ " WRITE");
         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);
     }    
 }



Mime
View raw message