H2 when running in MYSQL compatibility cannot handle (or ignore) COMMENT commands in CREATE statements. For example:
create table ASN_SUP_ATTACH_T (ID bigint not null auto_increment, ATTACHMENT_ID varchar(255), ASN_SUP_ITEM_ID bigint not null, primary key (ID), unique (ATTACHMENT_ID, ASN_SUP_ITEM_ID)) comment='This table is for assignment supplement item attachment.' Results in: Unsuccessful schema statement: create table ASN_SUP_ATTACH_T (ID bigint not null auto_increment, ATTACHMENT_ID varchar(255), ASN_SUP_ITEM_ID bigint not null, primary key (ID), unique (ATTACHMENT_ID, ASN_SUP_ITEM_ID)) comment='This table is for assignment supplement item attachment.' ENGINE=InnoDB org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE TABLE ASN_SUP_ATTACH_T (ID BIGINT NOT NULL AUTO_INCREMENT, ATTACHMENT_ID VARCHAR(255), ASN_SUP_ITEM_ID BIGINT NOT NULL, PRIMARY KEY (ID), UNIQUE (ATTACHMENT_ID, ASN_SUP_ITEM_ID)) COMMENT[*]='This table is for assignment supplement item attachment.' ENGINE=INNODB "; Is there a way to get H2 to ignore the COMMENT? This SQL is generated by Hibernate 3.6 so I cannot simply remove the comments. -AZ -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
