InnoDB JPA, keep forcing MyISAM
My school thought it would be nice to add another requirement to our exam 80% in the process.
We now have to care about the database, not that I don't do normally, but they wanted us to use JPA and left us focusing on the diagrams and code instead.
Now they thought it over and we need to analyze the database and the relations and we, as our group don't use Windows, has not been using MSSQL as our teachers does, but MySQL.
开发者_Python百科So unfortunately we realized that our entire database is stored as MyISAM, and it doesn't seem like JPA want to do otherwise?
I've tried to add this to my.cnf (Debian server):
default-storage-engine=innodb
default-table-type=innodb
But didn't solve anything.
Is it possible to get InnoDB from JPA, so that we have base for next and last week?I found the solution :D Thanks for your effort
http://blog.eflow.org/archives/145
jdbc:mysql://localhost:3306/databasename?autoReconnect=true&sessionVariables=storage_engine=InnoDB
The part: sessionVariables=storage_engine=InnoDB
To convert MyISAM to innodb is as simple as
ALTER TABLE YOUR_TABLE ENGINE=InnoDB;
There are certain restrictions on InnoDB,
such as
- maximum index length allow
- fulltext support (innodb does not support)
These are some examples:
- http://dev.mysql.com/doc/refman/5.1/en/converting-tables-to-innodb.html
- http://dev.mysql.com/doc/refman/5.1/en/storage-engines.html
精彩评论