Reputation: 2833
I'm trying to duplicate my mysql tables for hsqldb in order to run some unit tests in my JPA / Hibernate project.
There are only two tables at the moment, but I can't get neither created in hsqldb. I used the example code from Spring documentation to run a schema.sql script before the test cases:
db = new EmbeddedDatabaseBuilder().addDefaultScripts().build();
But it always fails with "Unexpected token" exceptions with the token ranging from "DATABASE" to "(".
Is there a straight forward way of converting the mysql dump into something that hsqldb would understand? Or should I populate the test database some other way?
Upvotes: 1
Views: 2805
Reputation: 9761
I worked many years with HSQL and MySQL database and there's no tool that I know that converts a MySQL dump into a hsqldb script. I see two solutions here:
We always used the first solution, it's probably the easiest one.
Upvotes: 2