activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew J." <matthew0...@hotmail.com>
Subject ActiveMQ fails to create tables in MySQL 5.5.5
Date Fri, 30 Jul 2010 22:04:40 GMT

I have been running an embedded ActiveMQ database, using MySQL as the JDBC
data source.  This worked fine under MySQL 5.4.  I have recently tried
upgrading to MySQL 5.5.5.  ActiveMQ works fine as long as the three required
tables in the activemq database are already created.  However, if they
aren't, it fails to create the tables.

The problem appears to be in the create table script that's used.  In
previous versions of MySQL, it was legal (though deprecated as of 4.1) to
specify the engine using the "TYPE=INNODB" syntax.  However, the preferred
non-deprecated way to do it was to use "ENGINE=INNODB" instead.  However,
under 5.5.5, it appears that the MySQL developers have made the "TYPE"
syntax completely illegal, requiring use of the "ENGINE" syntax.

A relevant MySQL bug discussing the issue:
http://bugs.mysql.com/bug.php?id=17501

The following is an example of the actual SQL that is generated by ActiveMQ:

CREATE TABLE ACTIVEMQ_MSGS(ID BIGINT NOT NULL, CONTAINER VARCHAR(250),
MSGID_PROD VARCHAR(250), MSGID_SEQ BIGINT, EXPIRATION BIGINT, MSG LONGBLOB,
PRIMARY KEY ( ID ) ) TYPE=INNODB

I haven't had the opportunity to test it, but it seems likely that the
culprit is MySqlJDBCAdapter.java.  It includes the line:

String typeClause = " TYPE="+type;

which should probably change to

String typeClause = " ENGINE="+type;

-- 
View this message in context: http://old.nabble.com/ActiveMQ-fails-to-create-tables-in-MySQL-5.5.5-tp29310273p29310273.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message