lbehnke / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

fail to create primary key or unique key in MySQL Compatibility mode #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to run Wordpress with H2 MYSQL Compatibility mode. 

The following statement caused error:
 PRIMARY KEY  (TERM_ID),
 UNIQUE KEY SLUG[*] (SLUG),
 KEY NAME (NAME)

full DDL:

CREATE TABLE WP_TERMS (
 TERM_ID BIGINT(20) NOT NULL AUTO_INCREMENT,
 NAME VARCHAR(200) NOT NULL DEFAULT '',
 SLUG VARCHAR(200) NOT NULL DEFAULT '',
 TERM_GROUP BIGINT(10) NOT NULL DEFAULT 0,
 PRIMARY KEY  (TERM_ID),
 UNIQUE KEY SLUG[*] (SLUG),
 KEY NAME (NAME)
)  ;

Syntax error in SQL statement CREATE TABLE WP_TERMS (
 TERM_ID BIGINT(20) NOT NULL AUTO_INCREMENT,
 NAME VARCHAR(200) NOT NULL DEFAULT '',
 SLUG VARCHAR(200) NOT NULL DEFAULT '',
 TERM_GROUP BIGINT(10) NOT NULL DEFAULT 0,
 PRIMARY KEY  (TERM_ID),
 UNIQUE KEY SLUG[*][*] (SLUG),
 KEY NAME (NAME)
); expected (; SQL statement:
CREATE TABLE WP_TERMS (
 TERM_ID BIGINT(20) NOT NULL AUTO_INCREMENT,
 NAME VARCHAR(200) NOT NULL DEFAULT '',
 SLUG VARCHAR(200) NOT NULL DEFAULT '',
 TERM_GROUP BIGINT(10) NOT NULL DEFAULT 0,
 PRIMARY KEY  (TERM_ID),
 UNIQUE KEY SLUG[*] (SLUG),
 KEY NAME (NAME)
) [42001-107] 42001/42001

Original issue reported on code.google.com by mingfai...@gmail.com on 1 Feb 2009 at 4:27

GoogleCodeExporter commented 9 years ago
you may also check the attached error log that contains all the failed DDL. 

Original comment by mingfai...@gmail.com on 1 Feb 2009 at 4:30

Attachments:

GoogleCodeExporter commented 9 years ago
The syntax UNIQUE KEY <indexName> and UNSIGNED will be supported in the next 
release.

Original comment by thomas.t...@gmail.com on 6 Feb 2009 at 5:03

GoogleCodeExporter commented 9 years ago
Should work with version 1.1.108.
Please re-open if not.

Original comment by thomas.t...@gmail.com on 1 Mar 2009 at 10:06