sagarswathi / h2database

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

Support engine & charset option create table in MySQL mode #431

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Before submitting a bug, please check the FAQ:
http://www.h2database.com/html/faq.html

What steps will reproduce the problem?
(simple SQL scripts or simple standalone applications are preferred)

1. Start h2 with MODE=MySQL 
2. create table foo (id int) engine=InnoDB charset=UTF8;

What is the expected output? What do you see instead?

Expected output is a created table, however H2 balks on the "engine=XXX 
charset=YYY" part. If I remove this it works.

What version of the product are you using? On what operating system, file
system, and virtual machine?

- H2 v1.2.130
- Mac OS X 10.7.4
- java version "1.6.0_35"

Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)

Do you know a workaround?

Pre-process the file and remove the offending statements.

What is your use case, meaning why do you need this feature?

I would like to create the schema using the INIT option. We deploy to MySQL in 
integration environment & etc but want to run unit tests using H2.

How important/urgent is the problem for you?

I have a work-around, but it would make the tests a lot cleaner if I could use 
the INIT statement to create an in-memory database using the correct schema 
rather than having to pre-process it first.

Please provide any additional information below.

Original issue reported on code.google.com by sbrautaset@gmail.com on 12 Dec 2012 at 4:37

GoogleCodeExporter commented 8 years ago
I attached a patch to support MySQL ENGINE variants.

Original comment by g...@maginatics.com on 9 Feb 2013 at 11:49

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

I will commit the patch with a few changes:

I will remove "command.setTransactional(true);" (why did you add that?)

I will support also support "charset=UTF8" (why didn't you support this in your 
patch?)

Original comment by thomas.t...@gmail.com on 23 Feb 2013 at 4:33

GoogleCodeExporter commented 8 years ago
Should be fixed in H2 version 1.3.171

Original comment by thomas.t...@gmail.com on 17 Mar 2013 at 4:05