I'm not sure how improving MySQL compatibility support is supposed to work 
so please bear with me. I have some scripts that I would prefer not to 
change and some of the statements for creating tables set 
ROW_FORMAT=DYNAMIC (details on the MySQL feature can be found here 
<http://dev.mysql.com/doc/refman/5.5/en/innodb-row-format-dynamic.html>).

e.g.
create table foo (
    foo_id bigint not null,
    bar varchar(2048),
    baz varchar(255) not null,
    primary key (foo_id, baz)
) ROW_FORMAT=DYNAMIC;

H2 throws an exception and from what I can tell it is because of the 
"ROW_FORMAT=DYNAMIC" declaration:
org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE TABLE 
FOO (
    FOO_ID BIGINT NOT NULL,
    BAR VARCHAR(2048),
    BAZ VARCHAR(255) NOT NULL,
    PRIMARY KEY (FOO_ID, BAZ)
) ROW_FORMAT[*]=DYNAMIC "; SQL statement:
create table foo (
    foo_id bigint not null,
    bar varchar(2048),
    baz varchar(255) not null,
    primary key (foo_id, baz)
) ROW_FORMAT=DYNAMIC [42000-182]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:179)
at org.h2.message.DbException.get(DbException.java:155)
at org.h2.message.DbException.getSyntaxError(DbException.java:191)
at org.h2.command.Parser.getSyntaxError(Parser.java:518)
at org.h2.command.Parser.prepareCommand(Parser.java:245)
at org.h2.engine.Session.prepareLocal(Session.java:446)
at org.h2.engine.Session.prepareCommand(Session.java:388)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1190)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:170)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:158)

>From what I can understand from the MySQL feature this is basically a no-op 
for H2 as it is already storing the data differently and so it should be 
able to simply ignore this part of the MySQL dialect. Would a change to H2 
to ignore such be reasonable or am I going down the wrong route?

Thank you.

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to